Configuring Alipay (domestic)
Learn how to configure Alipay (domestic) for DigitalRiver.js with Elements.
If you're using DigitalRiver.js with Elements, you can create an Alipay (domestic) payment method for your app or website in three easy steps:
Step 1: Build an Alipay (domestic) source request object
The Alipay (domestic) Source Request object requires the following fields.
Field | Value |
---|---|
|
|
| The payment session identifier. |
| An Owner object. |
| An Alipay (domestic) Source Details object that includes the details of the transaction. |
Alipay (domestic) source details object
Field | Required/Optional | Description |
---|---|---|
returnUrl | Required | Where you will redirect your customer after the customer authorizes or cancels within the Alipay (domestic) experience. |
Step 2: Create the Alipay (domestic) source using DigitalRiver.js
Use the DigitalRiver.js library to create and mount elements to the HTML container.
The address
object must contain postal code and state/province data that adheres to a standardized format.
Alipay (domestic) source example
Step 3: Authorize an Alipay (domestic) source
When you create an Alipay (domestic) source, the customer must authorize the charge through their payment provider. You can accomplish this by redirecting the customer to their payment provider.
Redirecting the customer for authorization
Use the redirectUrl
parameter in your createSource
response to redirect your customer to the payment provider for authorization.
The payment provider presents the customer with the transaction details to authorize or cancel the transaction. A successful authorization redirects the customer to the Alipay Return URL parameter you specified when you created the source.
Step 4: Use the authorized source
Once authorized, you can use the source by attaching it to a checkout.
Last updated