Page MenuHomePhabricator

Venmo error: Cannot use a single-use payment method more than once.
Closed, ResolvedPublic

Description

Evelyn ran into this doing a venmo donation, her ct id:

225454033

payments-braintree-20241210.gz:Dec 9 20:13:10 payments1006 braintree_gateway: 225454033:225454033.1 createPayment call came back with validation error in payment_method with message: Cannot use a single-use payment method more than once.

This happened 41 times on the 9th, there were 5216 successful donations that day

Event Timeline

I diged into that a bit, this error was coming from authorization, and indicated that the donor has a donation already, which take this user as example https://civicrm.wikimedia.org/civicrm/contact/view?reset=1&cid=18519049&selectedChild=contribute that
wfan@frlog1002:/var/log/remote$ grep @Alisa-Curley13 *
payments-braintree:Dec 11 17:45:24 payments1007 braintree_gateway: 225739732:225739732.1 Calling createPayment for Braintree payment with: {"amount":"3.10","country":"US","currency":"USD","description":"Wikimedia Foundation","order_id":"225739732.1","user_ip":"50.145.61.50","payment_token":"c87a4546-c9a5-4f76-964e-6bc25494b51c","device_data":"{\"correlation_id\":\"c3b383856aaf3128c08408d1cb99d036\"}","user_name":"@Alisa-Curley13","gateway_session_id":"cGF5bWVudGNvbnRleHRfNDI0eDk0c3NycGQ5YzQ0dCM3YmVlNWViOS03OGYzLTQ2MGYtYmExMi1kMThjOGQ5NTM5MzI"}
payments-braintree:Dec 11 17:45:47 payments1007 braintree_gateway: 225739845:225739845.1 Calling createPayment for Braintree payment with: {"amount":"3.10","country":"US","currency":"USD","description":"Wikimedia Foundation","email":"xxxxxxx@gmail.com","phone":"14156062286","first_name":"xx","last_name":"xx","order_id":"225739845.1","user_ip":"50.145.61.50","payment_token":"c87a4546-c9a5-4f76-964e-6bc25494b51c","device_data":"{\"correlation_id\":\"65586886591abf566e1936bd6822ee17\"}","user_name":"@Alisa-Curley13","customer_id":"2712763537293312933","gateway_session_id":"cGF5bWVudGNvbnRleHRfNDI0eDk0c3NycGQ5YzQ0dCM3YmVlNWViOS03OGYzLTQ2MGYtYmExMi1kMThjOGQ5NTM5MzI="}

she has the successes donation already, so the second time that we try to make auth call with c87a4546-c9a5-4f76-964e-6bc25494b51c this same payment_token failed.

So this fail will not block real donations, just prevent double charge.

Change #1102381 had a related patch set uploaded (by Wfan; author: Wfan):

[wikimedia/fundraising/SmashPig@master] WIP: Avoid duplicate createPayment after fetch data

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

Change #1102381 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Avoid duplicate createPayment after fetch data

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

XenoRyet set Final Story Points to 4.