stripe.php update needed - not working with API version 2022-11-15

Post Reply
M1S1L
Posts: 36
Joined: 31 Dec 2021, 06:13
Name: Matt Lichtenwalter
Location: Salt Lake City, USA
Company Name: Commotion Interactive
Contact:

stripe.php update needed - not working with API version 2022-11-15

Post by M1S1L »

Hello Sergey,

I have Stripe API version 2022-11-15 in test mode using test publishable key, test secret key and test Endpoint signing secret and while the payment shows a successful in Stripe I am not receiving back a successful event that will change the payment status from pending to paid via automated process.

I can see that some changes were made in 2022-08-01 that say The following parameters have been removed from create Checkout Session:
line_items[amount]
line_items[currency]
line_items[name]
line_items[description]
line_items[images]

I changed the code on stripe.php to reflect these changes per stripe documentation:
Screen Shot 2022-11-22 at 5.28.57 PM.png
However, when I run a payment I don't get success message and automated process does not change payment status nor write message in comment field.

I turned on logging and get the following PHP error:
Screen Shot 2022-11-22 at 5.32.05 PM.png
If the problem is my fault because this isn't supposed to work when Stripe is in Test Mode I apologize - but if not, could you please take a look at stripe.php and test it please?

Thanks,

Matt
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: stripe.php update needed - not working with API version 2022-11-15

Post by support »

Files from archive replace to plugins\ext\payment_modules\
Let me know if it works ok now.
Attachments
stripe.zip
(484.1 KiB) Downloaded 87 times
M1S1L
Posts: 36
Joined: 31 Dec 2021, 06:13
Name: Matt Lichtenwalter
Location: Salt Lake City, USA
Company Name: Commotion Interactive
Contact:

Re: stripe.php update needed - not working with API version 2022-11-15

Post by M1S1L »

Thank you Sergey - It works!

I sent you a small gift via PayPal - I appreciate your hard work.

Matt
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: stripe.php update needed - not working with API version 2022-11-15

Post by support »

Thank you!
LPARO
Posts: 147
Joined: 03 Mar 2021, 18:01
Name: Luiz Paro
Location: Brasil, São Paulo

Re: stripe.php update needed - not working with API version 2022-11-15

Post by LPARO »

support wrote: 23 Nov 2022, 06:27 Files from archive replace to plugins\ext\payment_modules\
Let me know if it works ok now.
Dear Sergey

I tried to use this patch, however, right after the update I started to receive the "HTTP error 500"when trying to access the payment modules tab.

When analyzing the log file, I found the following message:

[06-Dec-2022 09:21:29 America/Sao_Paulo] PHP Fatal error: Cannot declare class Stripe\Stripe, because the name is already in use in /plugins/ext/payment_modules/stripe/stripe-php-7.14.2 /lib/Stripe.php online 10

Any idea how to fix that?
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: stripe.php update needed - not working with API version 2022-11-15

Post by support »

Strange. I have create new archive for you. Do next:
1) go to plugins\ext\payment_modules\ and remove \stripe and \stripe_subscription folders
If there is stripe.php file in plugins\ext\payment_modules\ folder then remove it too
2) unpack new code from attached archive.
Let me know if it works now.
Attachments
payment_modules.zip
(485.21 KiB) Downloaded 94 times
LPARO
Posts: 147
Joined: 03 Mar 2021, 18:01
Name: Luiz Paro
Location: Brasil, São Paulo

Re: stripe.php update needed - not working with API version 2022-11-15

Post by LPARO »

Now it's working!
Thank you!
Post Reply