You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stripe API not working as expected: latests versions not supported? (unable to deserialize payload. Expected version 2020-08-27, actual 2022-11-15)
#1159
Closed
icougil opened this issue
Dec 18, 2022
· 3 comments
Describe the bug
After following the steps described here and after creating the corresponding webhook in Stripe, it seems that Alf.io is not working as expected with Stripe API and therefore the payments are not confirmed as expected 😞.
I guess the alf.io uses the 2020-08-27 version of the Stripe API (I guess that is because the main activity that appears in Stripe is from that version). The issue is that Stripe does not offer you this version anymore when you create a webhook in Stripe 🙁. Therefore, I've tried the 2 other API versions you can choose (2022-08-01 or 2022-11-15) but without luck 😥
This is the stacktrace we saw in the log file once we proceed to pay:
2022-12-18 17:32:05.795 [qtp2113919627-947] WARN alfio.manager.payment.StripeWebhookPaymentManager - unable to deserialize payload. Expected version 2020-08-27, actual 2022-11-15, falling back to unsafe deserialization
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.18.jar:5.3.18]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783) ~[spring-aop-5.3.18.jar:5.3.18]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.18.jar:5.3.18]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.5.5.jar:5.5.5]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.5.5.jar:5.5.5]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.5.5.jar:5.5.5]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110) ~[spring-security-web-5.5.5.jar:5.5.5]
at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:179) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[jetty-server-9.4.45.v20220203.jar:9.4.45.v20220203]
(...)
2022-12-18 17:32:05.809 [qtp2113919627-947] ERROR alfio.manager.payment.StripeWebhookPaymentManager - Error while trying to confirm the reservation
java.lang.NullPointerException: Cannot invoke "com.stripe.model.ChargeCollection.getData()" because the return value of "com.stripe.model.PaymentIntent.getCharges()" is null
at alfio.manager.payment.StripeWebhookPaymentManager.processSuccessfulPaymentIntent(StripeWebhookPaymentManager.java:318) ~[classes/:?]
at alfio.manager.payment.StripeWebhookPaymentManager.processWebhook(StripeWebhookPaymentManager.java:285) ~[classes/:?]
at alfio.manager.payment.StripeWebhookPaymentManager$$FastClassBySpringCGLIB$$92259e9b.invoke(<generated>) ~[classes/:?]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753) ~[spring-aop-5.3.18.jar:5.3.18]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.18.jar:5.3.18]
(...)
2022-12-18T18:35:00+01:00 2022-12-18 17:35:00.458 [qtp2113919627-928] WARN alfio.manager.payment.StripeWebhookPaymentManager - unable to deserialize payload. Expected version 2020-08-27, actual 2022-11-15, falling back to unsafe deserialization
2022-12-18T18:35:00+01:00 2022-12-18 17:35:00.463 [qtp2113919627-928] WARN alfio.manager.TicketReservationManager - discarding transaction webhook payment_intent.succeeded for reservation id ee70d21e-6ad3-4fb2-a399-c42eefa021ea (CANCELLED). Transaction status is: COMPLETE
2022-12-18T18:41:03+01:00 2022-12-18 17:41:03.750 [qtp2113919627-897] WARN alfio.manager.payment.StripeWebhookPaymentManager - unable to deserialize payload. Expected version 2020-08-27, actual 2022-11-15, falling back to unsafe deserialization
2022-12-18T18:41:03+01:00 2022-12-18 17:41:03.755 [qtp2113919627-897] WARN alfio.manager.TicketReservationManager - discarding transaction webhook payment_intent.succeeded for reservation id b3c64cdd-64a9-456b-99b5-f437479a76cc (CANCELLED). Transaction status is: COMPLETE
To Reproduce
Steps to reproduce the behavior:
Configure the Stripe API keys
Configure the webhook (with any of the API versions Stripe offers you)
Configure alfio with your corresponding Stripe keys
Try to pay a simple ticket
See the error
Expected behavior
The payment is confirmed and the user arrives to the last page where he/she can see the payment was confirmed properly.
Screenshots
Here you can see what the users will see on the last step:
Yes, there is a solution right now, if the users "force the check" of the payment. In that case yes, they will see the final confirmation message. The question is, what if they don't press the button? They will end up communicating with the organizers and of course, this could make a lot of trouble...
Lastly, if the users don't do anything, the result will not be satisfactory at all 🙁 :
Also here you can see the logs from the Stripe dashboard, where apparently Stripe notifies that the encoding is not correct: Invalid encoding: ISO-8859-1
Desktop:
OS: maOS
Browser: Chrome
Version: latest
Additional context
N/A
The text was updated successfully, but these errors were encountered:
the issue has been reported already from other people, but we haven't been able to reproduce it on our test account so far. It might be related only to live charges on newly created accounts.
Can you please share with us an anonymized version of the payload giving the error? You can see it on the stripe webhook log.
You can share it here or - if you feel more confortable - via email to info at alf.io
Describe the bug
After following the steps described here and after creating the corresponding webhook in Stripe, it seems that Alf.io is not working as expected with Stripe API and therefore the payments are not confirmed as expected 😞.
I guess the alf.io uses the
2020-08-27
version of the Stripe API (I guess that is because the main activity that appears in Stripe is from that version). The issue is that Stripe does not offer you this version anymore when you create a webhook in Stripe 🙁. Therefore, I've tried the 2 other API versions you can choose (2022-08-01
or2022-11-15
) but without luck 😥This is the stacktrace we saw in the log file once we proceed to pay:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The payment is confirmed and the user arrives to the last page where he/she can see the payment was confirmed properly.
Screenshots
Here you can see what the users will see on the last step:
Yes, there is a solution right now, if the users "force the check" of the payment. In that case yes, they will see the final confirmation message. The question is, what if they don't press the button? They will end up communicating with the organizers and of course, this could make a lot of trouble...
Lastly, if the users don't do anything, the result will not be satisfactory at all 🙁 :
Also here you can see the logs from the Stripe dashboard, where apparently Stripe notifies that the encoding is not correct:
Invalid encoding: ISO-8859-1
Desktop:
Additional context
N/A
The text was updated successfully, but these errors were encountered: