Appendices
Common
public class IAPConfiguration
Item | Type | Description | Required |
merchantId | String | The unique ID that is assigned by the ACQP to identify a merchant. Note: The value of this parameter must be the same as the one that is specified when calling the pay API. | M |
acquirerId | String | The unique ID that is assigned by Alipay+ to identify an ACQP. | M |
language | String | The language that is preferred by the user. The value of the parameter consists of a language code following the ISO-639 standard and a country code following the ISO-3166 standard. The codes are connected by an underscore. For example, The default value is Valid values are:
Note: If a valid value is specified for the language parameter, the specified language is used. Otherwise, the English language is used. | O |
envType | String | The type of environment where the SDK is installed. The value of this parameter affects the gateway address of the requests that are initiated from the SDK. Valid values:
Default value: | O |
fromScheme | String | The URL scheme that redirects the user from the MPP app to your app. Set the value to your app scheme. Currently, you need to specify this parameter only if you accept Alipay payments and import Alipay SDK to optimize the Alipay payment experience. | O |
ErrorCode
Error code | Error message | Description |
1001 | PARAM_ILLEGAL | Illegal parameters exist. |
1002 | INVALID_NETWORK | A network error occurs. |
1003 | SYSTEM_ERROR | A system error occurs. |
Cashier Payment
public class IAPPaymentSheetEvent
Item | Type | Description | Required |
name | String(constant value) | The name of the event that occurred in the lifecycle of the payment sheet. Note: The following events may occur only after you import Alipay SDK to optimize the Alipay payment experience:
| M |
message | String | The message that is related to the event. Note: The message is in the format of
| O |
constant values and possible messages
constant value | Description |
IAPPaymentSheetEventDidSelectWalletAndPay | The event where the user selected an MPP and clicked Pay Now to get redirected to the MPP app or WAP page. |
IAPPaymentSheetEventThrowException | The event where an exception is thrown. |
IAPPaymentSheetEventUserDidCancel | The event where the user clicked Close to cancel the payment. |
IAPPaymentSheetEventDidShow | The event where the payment sheet was successfully rendered. |
IAPPaymentSheetEventPaymentSuccess | The event where the payment succeeds. Note:
|
IAPPaymentSheetEventPaymentFailed | The event where the payment failed. Note:
|
IAPPaymentSheetEventPaymentCanceled | The event where the payment is canceled. Note:
|
IAPPaymentSheetEventPaymentException | The event where an exception is thrown. Note:
|
IAPPaymentSheetEventPaymentProcessing | The event where the payment is in unknown status. Note:
|