When we get an Amazon payment and don't have a pending message, let's use their API to look up donor details.
We need this to accept payments via Alexa.
When we get an Amazon payment and don't have a pending message, let's use their API to look up donor details.
We need this to accept payments via Alexa.
So this is an opportunity to make the Amazon flow more like the Adyen flow, where we combine the donor details from the pending DB in a separate job before sending the data to the donations queue. The Amazon version of the RecordCapture job should first look in the pending DB, then if the details aren't there, ask Amazon.
To ask Amazon, call getOrderReferenceDetails with amazon_order_reference_id set to the amazon-side ID, then use the details in the response
$getDetailsResult['GetOrderReferenceDetailsResult']['OrderReferenceDetails']['Buyer'] has properties 'Email' and 'Name'. We have to split first_name and last_name out of the name field.
Change 460468 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/SmashPig@master] WIP Amazon RecordPaymentJob
Change 461830 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/SmashPig@master] Don't stop action chain if CloseOrderReference fails
Change 461833 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/SmashPig@master] WIP send Amazon capture messages to jobs-amazon
Change 460468 merged by jenkins-bot:
[wikimedia/fundraising/SmashPig@master] Amazon RecordPaymentJob
Change 461833 merged by jenkins-bot:
[wikimedia/fundraising/SmashPig@master] Send Amazon capture messages to jobs-amazon
Change 461830 merged by Ejegg:
[wikimedia/fundraising/SmashPig@master] Don't stop action chain if CloseOrderReference fails
Change 463508 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/SmashPig@master] Amazon audit: fix IDs for donations started off-wiki
Change 463508 merged by jenkins-bot:
[wikimedia/fundraising/SmashPig@master] Amazon audit: fix IDs for donations started off-wiki
Change 463882 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[wikimedia/fundraising/crm@master] Amazon audit: donations without log data go to jobs-amazon
Change 463882 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Amazon audit: donations without log data go to jobs-amazon