Page MenuHomePhabricator

Handle recurring IPNs for Dlocal
Closed, ResolvedPublic

Description

Cstone got this IPN from an initial UPI payment:

{
"id":"F-413092-9b996803-00f0-4488-89e8-6c030a326956",
"event_info": {"type":"payment"},
"amount":823.00,
"status":"PAID",
"status_detail":"The payment was paid.",
"status_code":"200",
"currency":"INR",
"country":"IN",
"payment_method_id":"IR",
"payment_method_type":"WALLET",
"payment_method_flow":"REDIRECT",
"payer":{
  "name":"Jimmy Wales",
  "user_reference":"",
  "email":"jwales@example.com",
  "document":"AAAAA9999C",
  "address":{"city":"Mumbai","empty":false}
},
"wallet":{"token":"e299a5f9-920a-4be9-99d2-547841db9b4e"},
"order_id":"40060.1",
"description":"Wikimedia 877 600 9454",
"notification_url":"https://paymentsipntest4.wmcloud.org/dlocal",
"callback_url":"https://localhost:9001/index.php?title=Special:DlocalGatewayResult",
"created_date":"2023-03-07T22:58:57.000+0000"
}

We should send a job with this info to the jobs-dlocal queue, and that job should look up the pending table details and send the combined info to the donations queue. For inspiration you could look to the Adyen RecordCaptureJob class. (but just implement Runnable instead of extending the deprecated RunnableJob).

Related Objects

Event Timeline

Change 895887 had a related patch set uploaded (by Cstone; author: Cstone):

[wikimedia/fundraising/SmashPig@master] WIP: Create dlocal-jobs and move PAID messages there

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

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

[wikimedia/fundraising/crm@master] UPI donations queue consumer

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

Change 895887 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Create dlocal-jobs and move PAID messages there

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

This is in pending deployment, but the queue consumer patch using this ticket's ID is still in review. I'll split out the queue consumer patch into its own ticket to help us track that.

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

[wikimedia/fundraising/crm@master] UPI donations queue consumer

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

Change 895897 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] UPI donations queue consumer

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

XenoRyet set Final Story Points to 2.