Closed Pomax closed 3 years ago
Developer console log of someone who experienced the problem. mozilla_donate_errorlog_github1187_2.txt
^^^ that guy is Hungarian.
Another clue from a donor ... I added some bolding on the key part in the middle:
"I clicked the link to donate as it showed at the bottom of the new tab page in firefox, and I landed there: https://donate.mozilla.org/fr/dec2020/?utm_source=desktop-snippet&utm_medium=snippet&utm_campaign=giving-tuesday-dec2020&utm_term=24352&utm_content=REL&amount=5&frequency=single¤cy=eur&presets=5%2C15%2C30%2C50 However. Clicking "5€", "unique" (erm, or was it another word? "Single", perhaps? Not to have it automatically monthly, that was the thing), and clicking to pay with paypal, led to confusing results. A paypal window popped up, in which I had to identify myself (sure), confirm the paid amount, etc, and click "Pay" (well, mine was in French, as I'm French, so it said "Payer") And here's the bug: after I click to pay in the paypal pop-up window, that window self-closes... and the donation page @ firefox doesn't change at all, no "thank you" confirmation. So, I try again. Click 5€, unique, paypal window, Pay, nothing happens. I triple-checked, no 5€ sum was deducted once or twice from my paypal account, it simply failed without any error report. The only way I could have it finally successfully work, was to write manually another sum, not from the clickable buttons mentioning money sums. And then, the paypal payment worked. I'd be inclined to excluding extensions from causing that behaviour, as it worked with a hand-chosen amount of money, but just in case, I'm with ublock origin. * And there we are for the report, apologies for the wall of text. Here's to hoping nobody else has that problem, heh."
We need Braintree Sandbox developer credentials and a PayPal Sandbox account to test paypal payments locally, so we can get to the bottom of this. For now, us engineers are blocked.
@jamilasnell can you help with that?
@KalobTaulien got sandbox access today (12/3)
I don't have access to the sandbox, but looking at the form I think this related to how Django is localizing the preset decimals.
On the English form, the value
of the donation-amount__radio
fields are integers, 5
, 10
, etc. but on the localized forms for countries that use commas in their decimals, these values are 5,0
, 10,0
etc. - which isn't likely to be a valid format when submitted to PayPal.
This also explains why manually entering a value works as expected.
I don't have access to the sandbox, but looking at the form I think this related to how Django is localizing the preset decimals.
On the English form, the
value
of thedonation-amount__radio
fields are integers,5
,10
, etc. but on the localized forms for countries that use commas in their decimals, these values are5,0
,10,0
etc. - which isn't likely to be a valid format when submitted to PayPal.This also explains why manually entering a value works as expected.
Woah, nice find! Also it seem to only affect Campaign pages, values are set to 10
, 15
regardless of the locale on the homepage
That's amazing! Our next step would be to look at how to not localize the prices in the input field values.
I've filed https://github.com/mozilla/donate-wagtail/issues/1257 as clean-up follow up to see if we can't remove the code that provisions for working with decimal amounts, because we only allow integer amounts.
Describe the bug German and French users (approximately 50 in recent ~8 weeks have written in about this!) are reporting failures when trying to donate via Paypal.
Poking around, we seem to notice that ... a) not affecting US donors b) if you're already logged in to PayPal before you start the donation process, the problem seems to not happen c) the problem occurs on "child pages" in Wagtail, but can't be reproduced on the main parent (default) page at https://donate.mozilla.org/
To Reproduce Steps to reproduce the behavior (Firefox): 1a. Make sure you're logged out of PayPal. 1b. Go to https://donate.mozilla.org/de/jetzt-spenden/?subscribed=1&frequency=monthly&utm_source=newsletter-mofo&utm_medium=email&utm_campaign=SeptRECkicker&utm_term=5351122&presets=5,10,15,20¤cy=eur
(screenshots removed -- please ask Will for access to the google doc.)