Page MenuHomePhabricator

Handle INVALID_TAX_IDENTIFIER validation error code from Gravy
Closed, ResolvedPublic2 Estimated Story Points

Description

They've just added this to normalize errors from DLocal. We should add code to make it show a field-specific validation error like we do with our direct DLocal connection.

ejegg: Hi Gravy folks, are there plans to do better normalization of processor-side validation errors for DLocal? For example, this transaction failed at DLocal because of an invalid tax ID, but the response we get from you has no structured indication of the bad field, just

"error_code": "invalid_request_parameters",

When there is an error in a specific field, our direct connection with DLocal indicates which field it is so we can highlight it on the form and the donor can correct it.

Piero: A fix for this has been released, mapping was updated to INVALID_TAX_IDENTIFIER for the case of the incorrect payer.document and the rest of the payer attributes to INVALID_BILLING_ADDRESSYou can find more information on the payer attributes on Dlocal's Docs. Please let me know if you encounter any issues.

Event Timeline

Damilare set the point value for this task to 2.Sep 10 2025, 11:10 AM

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

[wikimedia/fundraising/SmashPig@master] Map validation errors from Gravy to ValidationError

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

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

[mediawiki/extensions/DonationInterface@master] Highlight fields on validation errors from gravy

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

Can be tested with e.g. the Gravy/dLocal Brazil form using id 12312312312

Change #1199798 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Map validation errors from Gravy to ValidationError

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

Change #1199816 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Highlight fields on validation errors from gravy

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

XenoRyet set Final Story Points to 2.