Objective-C 集成农行支付接口

 

 

  部分参考代码:

[NANetworkHandler POSTWithURL:APP_ABCPay par:dict isStored:NO success:^(id responseObject, BOOL getUrl) {
            if(responseObject)
            {
                NSDictionary *resultJson = [responseObject yy_modelToJSONObject];
                NSString *status = [[NSString alloc]initWithFormat:@"%@",resultJson[@"status"]];
                
                if ([status isEqualToString:@"1"])
                {
                    [[NSUserDefaults standardUserDefaults]setObject:resultJson[@"TOKEN"] forKey:@"ABC_PAY_TOKEN"];
                    NSString *requestUrl = [NSString stringWithFormat:@"CallbackID=APP标识&TokenID=%@&Method=pay",resultJson[@"TOKEN"]];
                    if ([[ABCAppCaller sharedAppCaller]isABCePayAvailable:@"bankabc://"]) {
                        [[ABCAppCaller sharedAppCaller]callBankABC:@"bankabc" param:requestUrl];
                    } else
                    {
                        [NATools showRequestAlertWithTitle:@"" message:@"尚未安装农行掌银,或已安装农行掌银版本不支持" timeInterval:1.0];
                    }
                }else if ([status isEqualToString:@"0"]){
                    NSString *msg = [[NSString alloc]initWithFormat:@"%@",resultJson[@"msg"]];
                    [NATools showRequestAlertWithTitle:@"" message:msg timeInterval:1.0];
                }
            }

 

全部评论

相关推荐

头像
11-21 11:39
四川大学 Java
是红鸢啊:忘了还没结束,还有字节的5k 违约金
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务