Commit ecf2e870 by houweibin

1,small fix

parent b1783b7f
...@@ -607,6 +607,7 @@ ...@@ -607,6 +607,7 @@
-(void)validateOrderPayResult{ -(void)validateOrderPayResult{
//微信支付,用户支付后,当用户没有点击完成按钮,而是直接使用home键,或者点击状态栏左上角返回APP订单页面时,微信的回调不会调用,而很容易出现订单结果丢失的情况,所以需要再确认一次订单是否完成。 //微信支付,用户支付后,当用户没有点击完成按钮,而是直接使用home键,或者点击状态栏左上角返回APP订单页面时,微信的回调不会调用,而很容易出现订单结果丢失的情况,所以需要再确认一次订单是否完成。
//支付宝暂时没有这种问题。 //支付宝暂时没有这种问题。
//checkout与order暂无法直接关联,现该api一直返回未支付。
if(self.beforePayData && self.beforePayData.wechatPayData){ if(self.beforePayData && self.beforePayData.wechatPayData){
self.beforePayData.wechatPayData = nil; self.beforePayData.wechatPayData = nil;
__weak KWMBeforePayVC *weakSelf = self; __weak KWMBeforePayVC *weakSelf = self;
...@@ -690,11 +691,4 @@ ...@@ -690,11 +691,4 @@
} }
//判断订单是否支付
-(void)requestCheckPay:(BUYCheckout *)checkout{
[self showLoading];
}
@end @end
...@@ -39,8 +39,9 @@ ...@@ -39,8 +39,9 @@
NSString *subject = @"test"; NSString *subject = @"test";
#else #else
NSString *checkout_token = checkout.token; NSString *checkout_token = checkout.token;
NSString *total_price = checkout.totalPrice.stringValue; //需要保留小数点后两位,以保持与后台一致,从而验证通过
NSString *subject = @""; NSString *total_price = [NSString stringWithFormat:@"%.2f",checkout.totalPrice.floatValue];
NSString *subject = @"Cemarose订单";
#endif #endif
NSString *ip_address = @"127.0.0.1"; NSString *ip_address = @"127.0.0.1";
NSString *before_sign = [NSString stringWithFormat:@"checkout_token=%@&ip_address=%@&subject=%@&total_price=%@&key=%@", NSString *before_sign = [NSString stringWithFormat:@"checkout_token=%@&ip_address=%@&subject=%@&total_price=%@&key=%@",
...@@ -66,8 +67,9 @@ ...@@ -66,8 +67,9 @@
NSString *subject = @"test"; NSString *subject = @"test";
#else #else
NSString *checkout_token = checkout.token; NSString *checkout_token = checkout.token;
NSString *total_price = checkout.totalPrice.stringValue; //需要保留小数点后两位,以保持与后台一致,从而验证通过
NSString *subject = @""; NSString *total_price = [NSString stringWithFormat:@"%.2f",checkout.totalPrice.floatValue];
NSString *subject = @"Cemarose订单";
#endif #endif
NSString *before_sign = [NSString stringWithFormat:@"checkout_token=%@&subject=%@&total_price=%@&key=%@", NSString *before_sign = [NSString stringWithFormat:@"checkout_token=%@&subject=%@&total_price=%@&key=%@",
checkout_token,subject,total_price,User_Pay_KEY]; checkout_token,subject,total_price,User_Pay_KEY];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment