Commit acbdb5ce by lee

u

parent 4dc523d3
......@@ -32,13 +32,17 @@
+(NSDictionary *)wechatPayParameters:(BUYCheckout *)checkout{
//这是测试商店的单,先用来测试
#if DEBUG
NSString *checkout_token = @"bfa0423b2b51657098d581a93e78bc00";
NSString *total_price = @"127.00";
//NSString *checkout_token = checkout.token;
//NSString *total_price = [NSString stringWithFormat:@"%.2f",checkout.totalPrice.floatValue];
NSString *ip_address = @"127.0.0.1";
//先写test,后面改成正式的订单描述
NSString *subject = @"test";
#else
NSString *checkout_token = checkout.token;
NSString *total_price = checkout.totalPrice.stringValue;
NSString *subject = @"";
#endif
NSString *ip_address = @"127.0.0.1";
NSString *before_sign = [NSString stringWithFormat:@"checkout_token=%@&ip_address=%@&subject=%@&total_price=%@&key=%@",
checkout_token,ip_address,subject,total_price,User_Pay_KEY];
NSString *base64String = [KWMStringUtil BASE64:before_sign];
......@@ -56,11 +60,15 @@
+(NSDictionary *)aliPayParameters:(BUYCheckout *)checkout{
//这是测试商店的单,先用来测试
#if DEBUG
NSString *checkout_token = @"bfa0423b2b51657098d581a93e78bc00";
NSString *total_price = @"127.00";
//NSString *checkout_token = checkout.token;
//NSString *total_price = [NSString stringWithFormat:@"%.2f",checkout.totalPrice.floatValue];
NSString *subject = @"test";
#else
NSString *checkout_token = checkout.token;
NSString *total_price = checkout.totalPrice.stringValue;
NSString *subject = @"";
#endif
NSString *before_sign = [NSString stringWithFormat:@"checkout_token=%@&subject=%@&total_price=%@&key=%@",
checkout_token,subject,total_price,User_Pay_KEY];
NSString *base64String = [KWMStringUtil BASE64:before_sign];
......@@ -83,7 +91,7 @@
request.prepayId= wechatData.prepayid;
request.package = wechatData.package;
request.nonceStr= wechatData.noncestr;
request.timeStamp= wechatData.timestamp;
request.timeStamp= (UInt32)wechatData.timestamp;
request.sign= wechatData.sign;
[WXApi sendReq:request];
}
......
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