MozillaFoundation / donate-wagtail

[Legacy] - Wagtail based donation stack
Mozilla Public License 2.0
43 stars 22 forks source link

Recurring credit card donations redirect to homepage in error #808

Closed WillatMozFdn closed 4 years ago

WillatMozFdn commented 4 years ago

Stephanie and I watched our Kount rep perform the following steps:

  1. Tried to make a recurring $3 donation on give.thunderbird.net using a credit card (but his browser auto-populated his former street address). The transaction failed with our generic error message. A verification transaction appears in Kount for this one (but oddly, not braintree)
  2. He updated his address and tried again ... it worked and went through, BUT he was redirected back to the give page, not the confirmation page. A record of his transaction is in braintree, but is not in Salesforce. Thus he received no donation receipt email. Which would lead him to believe the transaction did not go through ....

...which would explain a few dozen donors (so far I'm only seeing Thunderbird) who are submitting multiple transactions for the same amount within the time span of a few minutes. (I spotted them b/c multiple transactions in a short period of time triggers fraud reviews.) They're thinking it did not go through, when it did. This is creating significant customer service issues for us. Can we investigate and get fixed ASAP please?

WillatMozFdn commented 4 years ago

Update -- I just reproduced the problem. (WITHOUT the step of first entering an incorrect address.) Gave $2 recurring to tbird; instead of confirmation page, I was sent back to the thunderbird donate page. NOT to the confirmation page. My transaction is in Braintree and Stripe as I expected, BUT is not in salesforce -- so I don't have a receipt. (So in all likelihood I would try the transaction again!)

cadecairos commented 4 years ago

I can confirm this is happening on staging too. I will now try to reproduce in a development environment and start identifying a problem and a fix.

cadecairos commented 4 years ago

OK I found out what's causing the issue, we're hitting this code path in the TransactionRequiredMixin class that ensures a transaction has been made before redering the newsletter signup page (https://github.com/mozilla/donate-wagtail/blob/master/donate/payments/views.py#L514)

I'm going to bisect and find the breaking commit.