-
Notifications
You must be signed in to change notification settings - Fork 0
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
Do not add failed stripe transactions to database #9
Comments
If the card is declined, we don't add the transaction to the database. My understanding is that Stripe can now let a transaction go through and then decline it as fraud later on. If that understanding is true, we're going to have to see how to add that integration. |
Large numbers of small-value online donations end up with "Payment method: None". Clearly Stripe declined these out-of-hand. The stripe integration should allow more sophisticated removal, but these are cards where stripe does return a failure: we still add them. (this is implicitly the same issue as #5) |
Yeah, you're right. We add the transaction to the DB before we know whether or not the card was declined. We should probably delete such transactions in addition to displaying an error. Here's the relevant section of code: https://github.com/wuvt/donormotor/blob/main/donormotor/donate/views.py#L117 |
@echarlie suggested that I explain why we add the transaction to the DB before marking it as paid. The short answer is that the only reason is to be able to print out the ID if sending the receipt email fails. If whoever looks into this wants to refactor the payment process flow so that we don't do that, that would probably be a better solution. |
most of these are card testing that stripe blocks as fraud.
The text was updated successfully, but these errors were encountered: