Skip to content

Storage Value (Required) ​

Function ​

Used for player top-ups; supports pass-through parameters. If no pass-through parameters are required, this field can be set to an empty string. After calling this API, Apple’s payment interface will be displayed directly (whether it is shown and the number of purchases are both controlled by the game). An example is as follows:

Function ​

objective-c
- (void)gamedreamerStoreWithProItemid:(NSString *)proItemid
                                        andValidation:(NSString * _Nullable)validation
                                        andCompletion:(void (^)(NSDictionary *result, NSError *error))storeCallback;

Parameter ​

Parameter nameNullable (Yes/No)explain
proItemidNoPlatform product ID, provided by the game’s PM in charge.
validationYesPass-through parameters are transmitted by the original manufacturer.

Correction ​

Note that you must never rely on the client’s response as the definitive indication of a user’s payment outcome; instead, the server-side receipt of the payment notification or the results returned by the query API shall prevail. resultParameter:

Fieldexplain
codeWhen code = 1000, it indicates that the purchase was successful.

errorParameter (when the parameter is not empty, it indicates a purchase failure)

Example code ​

objective-c
[[GamedreamerManager shareInstance] gamedreamerStoreWithProItemid:proItemId andValidation:@"test_by_zts" andCompletion:^(NSDictionary *result, NSError *error) {

                NSLog(@"---------- 外部接口储值回调 >>>>> ");
                NSString *msg = @"";
                if(error){
					//錯誤信息
                    NSLog(@"%@",error);
}else{
msg = [NSString stringWithFormat:@"%@",result[@"message"]];
NSLog(@"%@", result);
If ([[result objectForKey:@"code"] intValue] == 1000){
//Recharge successful

}
}
}];