|
@@ -37,6 +37,13 @@
|
|
[btn2 addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
[btn2 addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
[self.view addSubview:btn2];
|
|
[self.view addSubview:btn2];
|
|
|
|
|
|
|
|
+ UIButton * btn3 = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
|
|
|
+ btn3.tag = 3;
|
|
|
|
+ btn3.frame = CGRectMake(80, 180, 200, 50);
|
|
|
|
+ [btn3 setTitle:@"银联支付" forState:UIControlStateNormal];
|
|
|
|
+ [btn3 addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
|
|
|
|
+ [self.view addSubview:btn3];
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
-(void)btnClick:(UIButton *)btn
|
|
-(void)btnClick:(UIButton *)btn
|
|
@@ -79,6 +86,12 @@
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (btn.tag == 3)//银联
|
|
|
|
+ {
|
|
|
|
+ [paramDic setObject:@"UP" forKey:@"paymentSchema"];
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
[self startPay:paramDic];
|
|
[self startPay:paramDic];
|
|
|
|
|
|
}
|
|
}
|
|
@@ -87,7 +100,7 @@
|
|
{
|
|
{
|
|
[paramDic setObject:[SignUtil getSign:paramDic] forKey:@"signature"];
|
|
[paramDic setObject:[SignUtil getSign:paramDic] forKey:@"signature"];
|
|
|
|
|
|
- NSString *url = @"https://local.allpay-test.com/api/unifiedorder";
|
|
|
|
|
|
+ NSString *url = @"https://testapi.allpayx.com/api/unifiedorder";
|
|
|
|
|
|
// NSString *url = @"https://api.allpayx.com/api/unifiedorder";
|
|
// NSString *url = @"https://api.allpayx.com/api/unifiedorder";
|
|
|
|
|