Skip to content
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

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

Nandika-A
Copy link
Contributor

@Nandika-A Nandika-A commented Jan 26, 2024

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:
Screenshot (56)

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.

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (a689641) 81.02% compared to head (495ec16) 80.95%.
Report is 3 commits behind head on main.

❗ Current head 495ec16 differs from pull request most recent head 0e1e389. Consider uploading reports for the commit 0e1e389 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            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     
Files Coverage Δ
donations/views.py 64.58% <40.00%> (-2.86%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a689641...0e1e389. Read the comment docs.

@Nandika-A Nandika-A changed the title Fixes #920. Resolved MVDkeyError in Stripe token Fixes #920 and #764. Resolved MVDkeyError in Stripe token Jan 26, 2024
Copy link
Contributor

@amakarudze amakarudze left a 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?

@Nandika-A
Copy link
Contributor Author

Thanks for your work on this @Nandika-A, can you add tests for the lines you added so coverage passes?

Ya sure!

@Nandika-A
Copy link
Contributor Author

Nandika-A commented Jan 29, 2024

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?

@amakarudze amakarudze merged commit 1394439 into DjangoGirls:main Jan 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants