Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Stripe v3 module for SCA


asro2004

Recommended Posts

7 minutes ago, peterespana said:

Stil some issues here....

I can now make a payment with version 1.0.8
Looks like it all finishes normally. But, it stays in Stripe as uncaptured. And no payment info in the admin area: remains as preparing....

I use a discount code coupon module, the discount is not visible in the order.

And last it ads more VAT, I have 1.61157 shipping +21% VAT = 1,95. This module ads 21% to 1,95.

 

Thanks for all the help, it's much appreciated.

Please try the version 1.0.9 I posted above. It should solve the order status issue.

Discount codes need additional support, I will update the discount coupon addon (and other addons I'm maintaining) with the required support when this stripe module is stable.

Link to comment
Share on other sites

1 minute ago, raiwa said:

Please try the version 1.0.9 I posted above. It should solve the order status issue.

Discount codes need additional support, I will update the discount coupon addon (and other addons I'm maintaining) with the required support when this stripe module is stable.

Thanks Raiwa for the good work. I give it a try later.

Link to comment
Share on other sites

@asro2004 @raiwa Have tested 1.0.9

Status updates now appear to behave correctly. However, customers comments appear correctly in the email confirmation but not in the comments in admin against the order.

If I add a comment in admin as I update the status that comment does appear.

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

4 minutes ago, mhsuffolk said:

@asro2004 @raiwa Have tested 1.0.9

Status updates now appear to behave correctly. However, customers comments appear correctly in the email confirmation but not in the comments in admin against the order.

Can you double check.

Order comments should appear already when on checkout_confirmation.php in " Preparing [Stripe SCA] " order status.

- check if you replaced the stripe_sca.php module
- check if you have these lines in place in the stripe_sca.php module lines 235-240:

                $sql_data_array = array('orders_id' => $insert_id, 
                                        'orders_status_id' => $order->info['order_status'], 
                                        'date_added' => 'now()', 
                                        'customer_notified' => '',
                                        'comments' => $order->info['comments']);
                tep_db_perform('orders_status_history', $sql_data_array);

 

Edited by raiwa
Link to comment
Share on other sites

Yes, those lines are there.

I have just noticed that indeed the comment was there but because it was last in the list, that is first to be created I did not spot it. The old Stripe module put the comments beside the order processed status, that is at the top of the list. I believe other payment modules do this also.

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

Link to comment
Share on other sites

Yes, but the problem here is that if added to the last status, they would be lost if no successful payment is returned. I believe it's important for the shopowner to see the customers comment even payment failed or even if the customer doesn't complete the checkout/payment.

EDIT: Just checked again and the comment shows in "Preparing [Stripe SCA] " status which should be the first in the list.

Edited by raiwa
Link to comment
Share on other sites

I have just tested the most recent version with live and test payments and all seems to be working as it should. I did uninstall and remove the old stripe code form the site before testing so things must be looking up.

My only comment is that payment details are showing again on the invoices. Is there a way for this not to show, but to be saved somewhere. In some of the earlier versions this dint happen.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Thanks for testing. I just uploaded v.1.0.9.

4 minutes ago, 14steve14 said:

My only comment is that payment details are showing again on the invoices. Is there a way for this not to show, but to be saved somewhere. In some of the earlier versions this dint happen.

Can you please post a screenshot of what you mean. I believe this is not a payment module issue. It is added by admin/invoice.php.

 

Link to comment
Share on other sites

Many thanks @raiwa for the quick response. There are some comments showing where the order comments should be n my invoice. This is the only payment module to show them. The old original module also showed them. I have circled the comments. What I dont have is an image with the standard order comments showing that a customer can add to the order process.

invoice-order-comments.png

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Steve, I just had a look and there is no order comment output included in the core invoice.php

This must be a customization in your store. You should edit your invoice.php and remove or condition the comment output or try to get the last order status comment of the stripe module which should be the customer comment.

Link to comment
Share on other sites

3 minutes ago, raiwa said:

You should edit your invoice.php and remove or condition the comment output or try to get the last order status comment of the stripe module which should be the customer comment.

Earlier today you said

7 hours ago, raiwa said:

Yes, but the problem here is that if added to the last status, they would be lost if no successful payment is returned. I believe it's important for the shopowner to see the customers comment even payment failed or even if the customer doesn't complete the checkout/payment.

So presumably the comment would not appear on the invoice as it is not in the last status.

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 just placed a test order and added a comment to the order. That comment shows on the invoice at the top of the comments section.

If I knew what I was doing I would look at the PayPal module and see why that only shows the customer order comments and not any of the other stuff it saves.

Like I say the old module for Stripe used to do this so nothing lost. I just wondered if it could be removed. Thanks for taking the time to look.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

36 minutes ago, mhsuffolk said:

Earlier today you said

So presumably the comment would not appear on the invoice as it is not in the last status.

There is a misunderstood/bad expression from my part. In one case I referred to the last comment added, in the other to the last comment in the list, which is the first added. Whoo now I'm confused myself 😉

Link to comment
Share on other sites

20 minutes ago, 14steve14 said:

I have just placed a test order and added a comment to the order. That comment shows on the invoice at the top of the comments section.

If I knew what I was doing I would look at the PayPal module and see why that only shows the customer order comments and not any of the other stuff it saves.

Like I say the old module for Stripe used to do this so nothing lost. I just wondered if it could be removed. Thanks for taking the time to look.

You'll need to modify your custom code in invoice.php. You could add a condition to the loop which shows the comments like "if (orders_status_id != '[ your Stripe SCA [Transactions] id] ')". Or better add the condition already to the database query which retrieves the comments.

Don't take this snippet literal, it's just conceptual.

Link to comment
Share on other sites

On 9/18/2019 at 10:30 AM, peterespana said:

I use a discount code coupon module, the discount is not visible in the order.

Hello Peter,

Here the modified file, based on v. 1.0.10, which includes the code for the Discount Coupon module. It is for Discount_Codes_5.1.0_Phoenix and higher which uses hook.

If you have a lower version, just paste the same code you are using in checkout_process.php in place of the hook call lines 113-119.

stripe_sca.php

Please confirm and I'll upload the update including this support.

Thanks and kind regards
Rainer

Link to comment
Share on other sites

1 hour ago, raiwa said:

Hello Peter,

Here the modified file, based on v. 1.0.10, which includes the code for the Discount Coupon module. It is for Discount_Codes_5.1.0_Phoenix and higher which uses hook.

If you have a lower version, just paste the same code you are using in checkout_process.php in place of the hook call lines 113-119.

stripe_sca.php

Please confirm and I'll upload the update including this support.

Thanks and kind regards
Rainer

Hello Raiwa, thanks so much,

I use this discount coupon module:

 * discount_coupon.php
 * August 4, 2006
 * author: Kristen G. Thorson
 * ot_discount_coupon_codes version 3.0

 

Thanks Peter

Link to comment
Share on other sites

Sorry, that's another one which I have no idea about. If you do not get it to work, try the one I referred to.

Link to comment
Share on other sites

23 minutes ago, raiwa said:

Sorry, that's another one which I have no idea about. If you do not get it to work, try the one I referred to.

It's working fine in the admin area the discount is now showing, as it should be.

EUR 4.99
Discount Coupon R4WY99R9 applied: -EUR 0.50
Sub-Total: EUR 4.49
Regular mail: EUR 2.36
Total: EUR 6.85

But not on the order confirmation. Only the item(s), no shipping, no discount and no total. 

phs (B122512) = EUR 4.99
------------------------------------------------------

Delivery Address
xxxxxxxx
xxxxxxxx



 

 

Thanks, step by step we are getting there :)

 

Regards Peter

 

 

Link to comment
Share on other sites

Hello All,

Thanks for this great addon.

I did some testing on version 1.0.10.

I'm facing 2 issues:

1. Confirmation email shows no order totals, only list the ordered items.

2. While going the the payment process I found that till confirmation_process.php everything works, also the prices are corrected calculated and displayed. After confirming the order, email was sent without order totals and also the shipping costs (net € 7.563 ) supposed to be € 9,- (which included 19% vat) is being displayed in the admin section with € 10.71. So another 19% was aplied to the € 9,-. In the database orders_total the faulty amount of € 10.71 was recorded.

 

Since I'm not a great programmer, I hope to contribute here with testing results.

Best regards,

John

 

 

 

 

Link to comment
Share on other sites

1. I can confirm that the confirmation email does not contain totals. I must confess that I had not noticed it.

2. As I am not VAT registered my prices are tax inclusive so I cannot test this issue.

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

New Bugs

1. Just had a customer order 15  different items, he tried 3 times to use Stripe and failed. The Stripe log in their dashboard shows a 400 error with this comment in the Response body section.

"message": "Metadata can have up to 50 keys, but you've set 93

2. I use the Quantity Discounts by That Software Guy addon for Phoenix. It calculated the correct discount but somewhere in the process the discount amount got deducted twice. The shipping charge was correct. This error appears to be similar to @John P problem but relates to discount, his was tax.

The old Stripe module worked correctly with this addon as do other payment modules

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

Link to comment
Share on other sites

Update. Tried a test transaction with 8 different items and I get this at the bottom of the checkout confirmation page.

Fatal error: Uncaught Stripe\Error\InvalidRequest: Metadata can have up to 50 keys, but you've set 51. Email us at [email protected] for more information. in D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca\lib\ApiRequestor.php:210 from API request 'req_qLTjoeFcjFlStD' Stack trace: #0 D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca\lib\ApiRequestor.php(173): Stripe\ApiRequestor::_specificAPIError('{\n "error": {\n...', 400, Object(Stripe\Util\CaseInsensitiveArray), Array, Array) #1 D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca\lib\ApiRequestor.php(473): Stripe\ApiRequestor->handleErrorResponse('{\n "error": {\n...', 400, Object(Stripe\Util\CaseInsensitiveArray), Array) #2 D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca\lib\ApiRequestor.php(126): Stripe\ApiRequestor->_interpretResponse('{\n "error": {\n...', 400, Object(Stripe\Util\CaseInsensitiveArray)) #3 D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca\lib\ApiOperations\Request.php(57): Stripe\ApiRequestor-> in D:\Phoenix_7_3\htdocs\includes\modules\payment\stripe_sca\lib\ApiRequestor.php on line 210

At this stage the discount and totals on the customers screen are correct but it will not let him go any further. The order is in admin at the preparing Status but it has the discount shown once but calculated twice.

If I remove 1 item from the cart it progresses to completion on the Stripe dashboard. However the discount issue remains..

If I disable the Discount module all is fine with 7 items or less.

I appreciate the discount issue may be caused by the addon but IMO the number of items is the Stripe module issue.

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

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...