Page MenuHomePhabricator

Don't send failmail on invalid Dlocal fiscal number errors
Closed, ResolvedPublic

Description

These should just show up as a validation error asking the donor to correct the error in their (localized field name)

Instead we're getting failmail with this raw response:

(400) BAD REQUEST: {"code":5001,"message":"Invalid parameter: payer.document","param":"payer.document"}

Event Timeline

Change 917946 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/SmashPig@master] Validation error instead of failmail for bad CPF

https://gerrit.wikimedia.org/r/917946

Change 917985 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Add test for dlocal ValidationError

https://gerrit.wikimedia.org/r/917985

Change 917990 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Fix fiscal_number ValidationError message

https://gerrit.wikimedia.org/r/917990

I was testing these by cloning the SmashPig patch into the payments vendor directory, then trying to submit a Brazil credit card with CPF 332.945.766-01 (passes our validation, but fails the checksum on their side). Note that it's one digit off from the one that will get you 'user blacklisted' errors.

Change 917946 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Validation error instead of failmail for bad CPF

https://gerrit.wikimedia.org/r/917946

Change 917985 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Add test for dlocal ValidationError

https://gerrit.wikimedia.org/r/917985

Change 917990 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Fix fiscal_number ValidationError message

https://gerrit.wikimedia.org/r/917990

Change 918619 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/SmashPig@master] Don't failmail on dlocal API 400 status response

https://gerrit.wikimedia.org/r/918619

Change 918619 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Don't failmail on dlocal 400 response with 'param'

https://gerrit.wikimedia.org/r/918619

OK, deployed the additional patch to really disable the failmail on this one!

XenoRyet set Final Story Points to 2.