Alipay+ DocsAlipay+ Docs

inquirePaymentOption

The inquirePaymentOption API is used to inquire whether the Alipay+ payment method is available and if so, related data about the Alipay+ payment method, such as the Alipay+ logo, brand name, and promotion information.

You can directly render the payment method page based on the data about the Alipay+ payment method. Alternatively, you can process the data about the Alipay+ payment method and append the processing result to the data about your existing payment methods, and then render the payment method page accordingly.

To improve loading performance and reduce data transfer costs, it is recommended that you cache the image of the Alipay+ logo by its CDN URL.

Method signature

copy
@Interface AlipayPlusClient:NSObject
- (void)inquirePaymentOption:(IAPInquirePaymentOptionParams *)params
           completionHandler:(void(^)(IAPPaymentOption *paymentOption, NSError *error))completionHandler;
@end

Request parameters

Name

Type

Length

Description

Required

params

IAPInquirePaymentOptionParams

/

An object that contains the parameters for querying the data about the Alipay+ payment method.

M

completionHandler

Block

(void(^)(IAPPaymentOption *paymentOption, NSError *error)

/

A block that is used to return the query result.

See completionHandler for details.

M

completionHandler

Name

Type

Length

Description

Required

paymentOption

IAPPaymentOption

/

The data about the Alipay+ payment method.

This parameter is returned if the inquiry is successful.

O

error

NSError

/

The error information about the inquiry.

This parameter is returned if the inquiry failed.

O

Response parameters

N/A

Sample

copy
IAPInquirePaymentOptionParams *params = IAPInquirePaymentOptionParams.new;
params.paymentCurrency = @"PHP";
params.logoPattern = @"YYY";
[[AlipayPlusClient shared] inquirePaymentOptionWithParams:params 
completionHandler:^(IAPPaymentOption *paymentOption, NSError *error) {
    if (!error && paymentOption.enabled) {
       
    } else {
    }
}