下载云闪付SDK
设置URL Schemes
info.plist添加白名单
代码示例
NSString *tn = @"后台返回的prepayId";
UIViewController *vc = [[[UIApplication sharedApplication] windows].firstObject rootViewController];
BOOL resutl = [[UPPaymentControl defaultControl] startPay:tn fromScheme:@"plist里的scheme" mode:@"00" viewController:vc];
if(!resutl){
NSLog(@"失败");
}else{
NSLog(@"成功");
}
网友评论