Using the Accept hosted payment page in an IFrame, the first transaction does not connect to the customer's profile though a payment profile is created.
If I attempt to create another transaction, I see the prior payment method. If I choose that one and enter another transaction, that transaction appears in the transaction list for the customer.
If I create a new payment method, that transaction goes through but is not connected to the customer. In other words, it does not appear in the transaction list for customer call (getTransactionListForCustomerRequest). I can repeat this where I can create another payment using the added payment method. Subsequently, that transaction is connected.
Sorry in advance about the formatting, but here is the payment page request:
{
"getHostedPaymentPageRequest": {
"merchantAuthentication": {
"name": "7E4bM2meNZcN",
"transactionKey": "847BugK5Vtc9Vx7Y"
},
"clientId": null,
"transactionRequest": {
"transactionType": "authCaptureTransaction",
"amount": "2.50",
"profile": {
"customerProfileId": "504170587"
},
"customer": {
"email": "manash@ionthree.com"
}
},
"hostedPaymentSettings": {
"setting": [
{
"settingName": "hostedPaymentButtonOptions",
"settingValue": "{\"text\": \"Pay\"}"
},
{
"settingName": "hostedPaymentOrderOptions",
"settingValue": "{\"show\": true}"
},
{
"settingName": "hostedPaymentReturnOptions",
"settingValue": "{\"showReceipt\": false, \"url\": \"https://localhost:3000/purchase\", \"urlText\": \"Continue\", \"cancelUrl\": \"https://localhost:3000/purchase\", \"cancelUrlText\": \"Cancel\"}"
},
{
"settingName": "hostedPaymentCustomerOptions",
"settingValue": "{\"showEmail\": true, \"requiredEmail\": true, \"addPaymentProfile\": true}"
},
{
"settingName": "hostedPaymentIFrameCommunicatorUrl",
"settingValue": "{\"url\": \"https://localhost:3000/AcceptHostedIFrameCommunicator\"}"
}
]
}
}
}
03-07-2022 06:56 PM
Any thoughts here? Am I using the payment page incorrectly? Here's my flow:
1. Create a customer profile, if one does not exist.
2. Record the customer profile ID
3. Create a payment page request with customerProfileID set.
4. Present the IFrame page
5. Accept takes over
6. Complete transaction - I get the transaction event but I notice that customer profile id and payment profile id are not in the data stream.
Somehow it does register the payment method to the customer profile. I am guessing that the payment method is recorded AFTER the transaction goes through. Therefore, they are not connected.
How can I tie an new transaction to an existing customer profile id?
Thank you.
03-14-2022 10:47 AM