Alipay+ DocsAlipay+ Docs

setConfiguration

The Mobile Payment Provider (MPP) app must use the setConfiguration API to set the initialization parameters before using other APIs.

Method signature

copy
NS_ASSUME_NONNULL_BEGIN

@interface MPPAlipayPlusClient : NSObject
@property (nonatomic, strong) MPPConfiguration *configuration;
- (void)setConfiguration:(MPPConfiguration *)configuration;
+ (instancetype)shared;
@end
NS_ASSUME_NONNULL_END

Request parameters

Item

Type

Description

Required

configuration

MPPConfiguration

Basic configuration that needs to be set up before starting a business.

M

Response parameters

N/A

Sample

copy
#import <MPPAlipayPlusClient/MPPAlipayPlusClientAPI.h>

MPPConfiguration *configuration = MPPConfiguration.new;
configuration.clientId = @"XXX";
configuration.envType = "PROD";
configuration.siteName = @"YYY";
[[MPPAlipayPlusClient shared] setConfiguration:configuration];