iOS支付文档

支付方法

- (void)doPayVersion:(NSString *)version
             account:(NSString *)account
            serverId:(NSString *)serverId
           playersId:(NSString *)playersId
                gold:(NSString *)gold
               money:(NSString *)money
           productId:(NSString *)productId
        cp_order_num:(NSString *)cp_order_num
           cp_extend:(NSString *)cpextend
             success:(AccOrderSuccessBlock)successBlock
             failure:(AccOrderFailureBlock)failureBlock
           otherWays:(AccOrderOtherWaysBlcok)otherWaysBlock;

例子

[[SH_SDKAccount sharedInstance] doPayVersion:@"1.1.0"
                                     account:@"accountStr"
                                    serverId:@"测试服"
                                   playersId:@"playersIdStr"
                                        gold:@"元宝"
                                       money:@"6"
                                   productId:@"com.wd.mx.1"
                                cp_order_num:@"订单号"
                                   cp_extend:@"测试" 
                                     success:^(NSDictionary *dic) 
                                         NSLog(@"支付成功 : %@",dic);
                                   } failure:^(NSString *error) {
                                        NSLog(@"支付失败 : %@",error);
                                   } otherWays:^{
                                        NSLog(@"渠道支付SDK");
                                   }];

参数说明

参数 事例 类型 说明
version string 版本与后台填写需一致
account string 玩家账号
serverId string 研发服务器id
playersId string 玩家唯一id
gold string 充值元宝
money string 充值金额
productId string 产品id
cp_order_num string 订单号
cpextend string 研发自定义参数
successBlock NSDictionary 支付成功block
failureBlock NSDictionary 支付失败block
otherWaysBlock 如需接入渠道支付SDK,可在此处接入

成功返回

{"code":1,"data":{"msg":"success"}}

失败返回

{"code":0,"msg":"具体错误信息"}

``

results matching ""

    No results matching ""