微信、支付宝和第三方应用的唤起
2018-10-26 本文已影响16人
虫yu
[Order getData:@{@"itemId":self.selectModel.id,
@"name":self.tfName.text,
@"mobile":self.tfPhoneNumber.text,
@"address":self.tvAddress.text} showHUD:YES parentViewController:self success:^(Order *data) {
[Pay getData:@{@"orderId":data.data} showHUD:YES parentViewController:self
success:^(Pay* data) {
[[DDPaymentKit sharedPaymentKit] b2cPayment:@{@"paymentId":@"alipay",
@"title":data.title,
@"body":data.body,
@"price":data.price,
@"payId":data.orderId}
callBack:^(BOOL result) {
if(result){
[UIView dd_showMessage:@"支付成功"];
[self go2Purchase:YES];
[GlobalKit sharedKit].user.buyTry = YES;
}else{
[UIView dd_showMessage:@"支付取消"];
}
[self dismissViewControllerAnimated:YES completion:NULL];
}];
} failure:^(NSError *error, NSString *message) {
[UIView dd_showMessage:message];
}];
} failure:^(NSError *error, NSString *message) {
}];