Class Info |
|---|
public class PurchaseIntentReq extends BaseReq Request information of the createPurchaseIntent API. |
Qualifier and Type | Method Name and Description |
|---|---|
String | Obtains the information stored on the merchant side. |
int | Obtains the product type. |
String | Obtains the product ID. |
String | Obtains the signature algorithm. |
void | setDeveloperPayload(String developerPayload) Sets the information stored on the merchant side. |
void | setPriceType(int priceType) Sets the product type. |
void | setProductId(String productId) Sets the product ID. |
void | setSignatureAlgorithm(String signatureAlgorithm) Sets the signature algorithm. |
Returns
Type | Description |
|---|---|
String | Information stored on the merchant side. If a value exists, the value will be returned in the callback result to the app after successful payment. NOTE: The value length range is [0, 256]. |
Returns
Type | Description |
|---|---|
int | Product type. The options are as follows:
|
Returns
Type | Description |
|---|---|
String | ID of a product to be paid. The product ID is defined when you add a product in AppGallery Connect. NOTE: The value length range is (0, 148]. The product ID must be unique within an app. Once saved, the product ID cannot be changed. This ID cannot be used again even if the product is deleted. |
Returns
Parameters
Name | Description |
|---|---|
developerPayload | Information stored on the merchant side. If a value exists, the value will be returned in the callback result to the app after successful payment. NOTE: The value length range is [0, 256]. |
Parameters
Name | Description |
|---|---|
priceType | Product type. The options are as follows:
|
Parameters
Name | Description |
|---|---|
productId | ID of a product to be paid. The product ID is defined when you add a product in AppGallery Connect. NOTE: The value length range is (0, 148]. The product ID must be unique within an app. Once saved, the product ID cannot be changed. This ID cannot be used again even if the product is deleted. |
Parameters
Name | Description |
|---|---|
signatureAlgorithm | Signature algorithm, which is optional. If a signature algorithm is passed, IAP will use it to sign order data. Currently, the value can only be SIGNATURE_ALGORITHM_SHA256WITHRSA_PSS, which indicates the SHA256WithRSA/PSS algorithm. NOTE: If no signature algorithm is passed, IAP will use the SHA256WithRSA algorithm by default to sign purchase data. CAUTION: For server-side signature verification, you can use the signatureAlgorithm field and set it to SHA256WithRSA/PSS, while for client-side signature verification, the signatureAlgorithm field is not allowed. |