Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Stripe v3 module for SCA


asro2004

Recommended Posts

It seems there is a metadata limit which gets reached if more than 7products are in the order. Didn’t know this. I believe, the products do not need to be included in the metadata any more, since the order mail is sent on order processing. If the author does not jump in for this and the order total issue, I’ll have a look when I find some time. Meanwhile I would suggest to use the old module.

Link to comment
Share on other sites

@mhsuffolk, @raiwa, @John P, @peterespana

I've fixed the order totals missing form the customer email, and the error that occured when a number of items were ordered. I removed the cart items from the Stripe transaction metadata.

The marketplace module has been updated with version 1.0.11, and this one includes the correct version number in the app signature.

Link to comment
Share on other sites

Thank you @asro2004 for the update.

I have tested this and can confirm that the more than 7 items problem is resolved as is the missing order totals in the email.

@raiwa The discount issue remains. This is NOT a hurry up, merely a confirmation that the discount problem remains.

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

Quote

@raiwa The discount issue remains

Interestingly the confirmation emails have the correct discount calculation, it is just the admin and the actual amount that is fed to Stripe that is incorrect.

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

53 minutes ago, mhsuffolk said:

Interestingly the confirmation emails have the correct discount calculation, it is just the admin and the actual amount that is fed to Stripe that is incorrect.

Just to be sure:

You are using Discount Coupons BS ?

Link to comment
Share on other sites

No, it is not a coupon addon

It is this but is an updated Phoenix version that is on his website. @swguyis the author. It works perfectly with all my other payment modules and worked with the original Stripe module.

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

24 minutes ago, mhsuffolk said:

No, it is not a coupon addon

It is this but is an updated Phoenix version that is on his website. @swguyis the author. It works perfectly with all my other payment modules and worked with the original Stripe module.

Then you should contact the author for support. I do not use this one and can't test.

Link to comment
Share on other sites

4 hours ago, asro2004 said:

@mhsuffolk, @raiwa, @John P, @peterespana

I've fixed the order totals missing form the customer email, and the error that occured when a number of items were ordered. I removed the cart items from the Stripe transaction metadata.

The marketplace module has been updated with version 1.0.11, and this one includes the correct version number in the app signature.

Updated and tested on my live site and all ok. Discount Codes BS also fine.

Just one minor issue:

In the Marketplace description it says:
 

Quote

This update changes this file:

ext/modules/payment/stripe_sca/payment_intent.php

Should be:

Quote

This update changes this file:

includes/modules/payment/stripe_sca.php

 

Link to comment
Share on other sites

On 9/27/2019 at 1:03 PM, raiwa said:

Updated and tested on my live site and all ok. Discount Codes BS also fine.

Just one minor issue:

In the Marketplace description it says:
 

Should be:

 

Hi Raiwa, it all seems to work fine, also the discount coupons are working perfectly. But, the status of the payment always remains as: Preparing [Stripe SCA]. 

Stripe does get the payment. And the client gets his confirmation. But does not see his order in the order history.

If indicated in the module that after payment status should be processing...

Hope you have an idea.

 

Thanks!! Peter.

Link to comment
Share on other sites

Module has been updated to 1.0.12 to fix some issues with the stripe payment amount apparent when used in conjunction with some odler discount modules. Also, a problem with duplicate orders in 'preparing' state being created when the customer returns to the cart from the payment page.

@peterespana, please use the 'send test webhook...' link in the stripe dashboard to check the link to the webhook on your server. It should show a 400 response code, with the message 'Invalid webhook signature: No signatures found matching the expected signature for payload'. If that is ok, please double check you stripe configuration 'transaction method' is set to 'capture' and not authorise. If that's the problem, it won't send to the webhook until you capture the payment in the stripe dashboard.

Link to comment
Share on other sites

On 10/2/2019 at 2:18 AM, asro2004 said:

Module has been updated to 1.0.12 to fix some issues with the stripe payment amount apparent when used in conjunction with some odler discount modules. Also, a problem with duplicate orders in 'preparing' state being created when the customer returns to the cart from the payment page.

@peterespana, please use the 'send test webhook...' link in the stripe dashboard to check the link to the webhook on your server. It should show a 400 response code, with the message 'Invalid webhook signature: No signatures found matching the expected signature for payload'. If that is ok, please double check you stripe configuration 'transaction method' is set to 'capture' and not authorise. If that's the problem, it won't send to the webhook until you capture the payment in the stripe dashboard.

@asroo2004, it's set to capture and webhook log says 200 OK. The payment comes in alright. Only the status remains "preparing' instead of processing. Clients gets his confirmation, but the order isn't in the order history of the client.

Maybe you have an idea where to look for this problem.

Thanks and regards, Peter.

Link to comment
Share on other sites

  • 2 weeks later...

Is there any way to get column titles on the checkout form where the card details need to be added. I have had a couple of customers get confussed about where and how to enter the required information. On looking at this the long card number is sort of easy it's the expiry date and the last 3 digits that cause confusion. If someone can tell me where the form is created I may be able to do something.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

I am having a bit of bother with the latest version of this great addon. I removed all the old files from the server and uploaded version 12 to the system and went to install and all the language defines do not seem to be working. In the admin area where the settings are changed every title and bit of text is as if the defines are not present. I have checked and double checked that the files are in the right place including uninstalling all files and uploading them again.

Has anyone had the same problem and if so what did you do to get them to show correctly.

Before I uninstalled all the files version 10 was working fine. I should have left it all alone.

stripe1.jpg

stripe2.jpg

Edited by 14steve14

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

22 hours ago, 14steve14 said:

Is there any way to get column titles on the checkout form where the card details need to be added. I have had a couple of customers get confussed about where and how to enter the required information. On looking at this the long card number is sort of easy it's the expiry date and the last 3 digits that cause confusion. If someone can tell me where the form is created I may be able to do something.

The card details form is generated by Stripe using a placeholder passed to it by the module's javascript in includes/modules/paymant/stripe_sca.php around lines 974-977:

    var card = elements.create('card', {hidePostalCode: true});
    
    // Add an instance of the card Element into the `card-element` <div>.
    card.mount('#card-element');

Stripe's documentation about elements: https://stripe.com/docs/stripe-js

Link to comment
Share on other sites

15 hours ago, 14steve14 said:

I am having a bit of bother with the latest version of this great addon. I removed all the old files from the server and uploaded version 12 to the system and went to install and all the language defines do not seem to be working. In the admin area where the settings are changed every title and bit of text is as if the defines are not present. I have checked and double checked that the files are in the right place including uninstalling all files and uploading them again.

The prompts are declared in includes/languages/english/modules/payment/stripe_sca.php. It's probably best to just copy the ext and includes directories from the install/update and let it replace all the corresponding files in the web site. It should only be necessary to make sure the ownership and permissions of the files allow them to be read by apache/nginx.

Check your site's error logs for any PHP errors.

Link to comment
Share on other sites

2 hours ago, asro2004 said:

The prompts are declared in includes/languages/english/modules/payment/stripe_sca.php. It's probably best to just copy the ext and includes directories from the install/update and let it replace all the corresponding files in the web site. It should only be necessary to make sure the ownership and permissions of the files allow them to be read by apache/nginx.

Check your site's error logs for any PHP errors.

Right. No errors in the error log files related to missing text defines or files. There were some about a 50 metatag restriction which is why I was updating the code as this problem had apparently been sorted. All file permissions seem to be the same as other payment modules.

Just uninstalled the payment module. Cleared all system and computer cache. Removed all the files from my hosts and replaced them with the latest offerings from the addon area (version 12). All files were copied to the correct locations and uploaded to my hosts. When I went to install the modules all the text defines are missing still.

Went and removed all the files again from my hosts and uploaded all the old module files and everything works fine. As I cant waste any more time on this at the present I am leaving the old payment module as active because its working. When I get time i will look into this further and start installing this from the beginning and see where it all goes wrong. I cant even find where the language files are referenced.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

On 10/13/2019 at 11:36 AM, 14steve14 said:

Is there any way to get column titles on the checkout form where the card details need to be added. I have had a couple of customers get confussed about where and how to enter the required information. On looking at this the long card number is sort of easy it's the expiry date and the last 3 digits that cause confusion. If someone can tell me where the form is created I may be able to do something.

Try this, it is not very pretty but it should help to lead the blind

includes/languages/modules/payment/stripe_sca.php Find

  define('MODULE_PAYMENT_STRIPE_SCA_CREDITCARD_TYPE', 'Credit or Debit card');

Replace with

  define('MODULE_PAYMENT_STRIPE_SCA_CREDITCARD_TYPE', 'Credit or Debit card_____Expiry Date Security No');

 

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

4 hours ago, mhsuffolk said:

Try this, it is not very pretty but it should help to lead the blind

includes/languages/modules/payment/stripe_sca.php Find


  define('MODULE_PAYMENT_STRIPE_SCA_CREDITCARD_TYPE', 'Credit or Debit card');

Replace with


  define('MODULE_PAYMENT_STRIPE_SCA_CREDITCARD_TYPE', 'Credit or Debit card_____Expiry Date Security No');

 

Thanks for that. That may stop the emails arriving that they dont understand a simple form. Thats the trouble with having a client based that are of the older generation.

Now to try again with the text defines in admin area.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

20 hours ago, 14steve14 said:

I cant even find where the language files are referenced.

The language files are loaded by the code that loads all the modules: /admin/modules.php for the admin pages, and /includes/classes/payments.php for the checkout pages.

 

Link to comment
Share on other sites

I am having exactly the same trouble on my test site, my live site and a phoenix test site. The languages are not shown and only the defines are showing as if the language files are not found,  on only the stripe payment module admin edit page. The payment module does seem to work fine with no errors on all the sites. Today I am going to try to restore the working files from version 10 and see if they work. If they do I will compare the files for the stripe_sca files and leave well alone.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

  • 3 weeks later...

Security issue

There can be a security problem for anyone who installed version 1.0.3 of this module, with some obsolete values being left in the configuration table when the modules is updated to a later version. Please run the following SQL to remove the obsolete values:

DELETE FROM configuration WHERE configuration_key IN ('MODULE_PAYMENT_STRIPE_SCA_PUBLISHABLE_KEY','MODULE_PAYMENT_STRIPE_SCA_SECRET_KEY','MODULE_PAYMENT_STRIPE_SCA_WEBHOOK_SECRET')

 

Link to comment
Share on other sites

  • 2 weeks later...
On 10/15/2019 at 3:32 AM, 14steve14 said:

I am having exactly the same trouble on my test site, my live site and a phoenix test site. The languages are not shown and only the defines are showing as if the language files are not found,  on only the stripe payment module admin edit page. The payment module does seem to work fine with no errors on all the sites. Today I am going to try to restore the working files from version 10 and see if they work. If they do I will compare the files for the stripe_sca files and leave well alone.

Try updating/changing your modules.php from the frozen release. I had the same problem on my older edge site.

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

I notice if the confirm order button is submitted with an invalid card number, a row is written to the orders table in the database with Preparing [Stripe SCA] status. Is this intended?

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

14 minutes ago, Smoky Barnable said:

I notice if the confirm order button is submitted with an invalid card number, a row is written to the orders table in the database with Preparing [Stripe SCA] status. Is this intended?

Yes, that is the correct behaviour. A payment intent on the Stripe website has to be created first before the card input field can be displayed. An OSC order creation is the first part of this process. I leave any of these in place for 7 days as the customer can still return and complete the order correctly without having to create a new/second order. If it has not been completed by then, simply delete the order in admin.

The PayPal app behaves in a similar way.

Edited by mhsuffolk

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

I have been using this on two production sites with no problems. Thanks to @asro2004 for a great module! One of my sites has a modified checkout process page so I had to make those changes in the stripe_sca class after_process function. Also the delete buttons in the customer account area are a bit jumbled if more than one card is saved. A <br> fixed that for me. Cheers! ☸️

Edited by Smoky Barnable

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...