Appendices
Common
public class IAPConfiguration
Item | Type | Description | Required |
merchantId | String | The unique ID that is assigned by the ACQP to identify a merchant. 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, 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 |
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 IAPInquirePaymentOptionParams
Item | Type | Description | Required |
paymentCurrency | String | The payment currency, also known as transaction currency, that is supported by the merchant. The value of this parameter must be an alphabetic code that follows the ISO 4217 standard, for example, "EUR" for Euros. | M |
logoPattern | String | The pattern of the logo, such as
| O |
public class IAPPaymentOption
Item | Type | Description | Required |
enabled | boolean | Indicates whether the Alipay+ payment method is available. Valid values are:
| M |
logos | List<Logo> | The logo information of the Alipay+ payment method. Nullable if the value of the enabled parameter is | O |
brandName | String | The brand name of the Alipay+ payment method. Nullable if the value of the enabled parameter is | O |
disableReason | String | The reason why the Alipay+ payment method is unavailable. The value of this parameter is null if the value of the enabled parameter is | O |
paymentMethodType | String | The payment method that is provided by Alipay+. The valid value is | M |
promoNames | List<String> | The list of promotion campaigns in the language that is preferred by the user. The language of the value of this parameter is the one that you specified in the setConfiguration API, or in English if none is specified. Each element in the array is a string that indicates the promotion name, such as Currently, the array contains only one element indicating one specific promotion campaign, which is the best offer that Alipay+ recommends to be displayed alongside the logo, rather than multiple different promotion campaigns. | O |
public class Logo
Item | Type | Description | Required |
logoName | String | The name of the logo. | O |
logoUrl | String | The URL of the logo. | O |
logoPattern | String | The pattern of the logo, such as
| O |
logoWidth | String | The width of the logo. | O |
logoHeight | String | The height of the logo. | O |
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. | M |
message | String | The message that is related to the event. | O |
constant values and possible messages
Name | Description |
EVENT_SELECT_AND_PAY | The event where the user selected an MPP and clicked Pay Now to get redirected to the MPP app or WAP page. |
EVENT_THROW_EXCEPTION | The event where an exception is thrown. |
EVENT_USER_CANCEL | The event where the user clicked Close to cancel the payment. |
EVENT_SHOW_SUCCESS | The event where the payment sheet was successfully rendered. |
EVENT_PAYMENT_SUCCESS | The event where the payment succeeds. Note:
|
EVENT_PAYMENT_FAILED | The event where the payment failed. Note:
|
EVENT_PAYMENT_CANCELED | The event where the payment is canceled. Note:
|
EVENT_PAYMENT_EXCEPTION | The event where an exception is thrown. Note:
|
EVENT_PAYMENT_PROCESSING | The event where the payment is in unknown status. Note:
|
public interface IAPInquirePaymentCallback
Return type | Method | Description |
void | onSuccess(IAPPaymentOption result) | The callback function that is used to return the data about the Alipay+ payment method. |
void | onFailure(String errorCode, String errorMessage) | The callback function that is used to return the error code and error message. |
public interface IAPPaymentSheetEventCallback
Return type | Method | Description |
void | onSheetEvent(IAPPaymentSheetEvent event) | The callback function that is used to return the event that occurred when the status of the payment sheet changed. |