-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #920 and #764. Resolved MVDkeyError in Stripe token #938
Fixes #920 and #764. Resolved MVDkeyError in Stripe token #938
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #938 +/- ##
==========================================
- Coverage 81.02% 80.95% -0.08%
==========================================
Files 95 95
Lines 2862 2867 +5
Branches 269 270 +1
==========================================
+ Hits 2319 2321 +2
- Misses 492 494 +2
- Partials 51 52 +1
Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this @Nandika-A, can you add tests for the lines you added so coverage passes?
Ya sure! |
Thanks for the review @amakarudze! I have added the tests. The test checks if the view redirects to the error page and if the expected session variable is set with the correct error message. Could you please check it now? |
This error (issue #920 and issue #764) was raised due to a network connection problem (occurs rarely) between the stripe and the server, hence the token was not getting generated. Solutions are mentioned in stripe's documentation.
This is fixed by exception handling. Now it displays the following message instead of giving an error:
Idempotency keys are also added while creating a customer, to recover from connection error. UUID V4 is used to generate a string that could be used as Idempotency key, as mentioned in the documentation.