-
Notifications
You must be signed in to change notification settings - Fork 2
/
Order.m
68 lines (59 loc) · 1.83 KB
/
Order.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// Order.m
// AlixPayDemo
//
// Created by 方彬 on 11/2/13.
//
//
#import "Order.h"
@implementation Order
- (NSString *)description {
NSMutableString * discription = [NSMutableString string];
if (self.partner) {
[discription appendFormat:@"partner=\"%@\"", self.partner];
}
if (self.seller) {
[discription appendFormat:@"&seller_id=\"%@\"", self.seller];
}
if (self.tradeNO) {
[discription appendFormat:@"&out_trade_no=\"%@\"", self.tradeNO];
}
if (self.productName) {
[discription appendFormat:@"&subject=\"%@\"", self.productName];
}
if (self.productDescription) {
[discription appendFormat:@"&body=\"%@\"", self.productDescription];
}
if (self.amount) {
[discription appendFormat:@"&total_fee=\"%@\"", self.amount];
}
if (self.notifyURL) {
[discription appendFormat:@"¬ify_url=\"%@\"", self.notifyURL];
}
if (self.service) {
[discription appendFormat:@"&service=\"%@\"",self.service];//mobile.securitypay.pay
}
if (self.paymentType) {
[discription appendFormat:@"&payment_type=\"%@\"",self.paymentType];//1
}
if (self.inputCharset) {
[discription appendFormat:@"&_input_charset=\"%@\"",self.inputCharset];//utf-8
}
if (self.itBPay) {
[discription appendFormat:@"&it_b_pay=\"%@\"",self.itBPay];//30m
}
if (self.showUrl) {
[discription appendFormat:@"&show_url=\"%@\"",self.showUrl];//m.alipay.com
}
if (self.rsaDate) {
[discription appendFormat:@"&sign_date=\"%@\"",self.rsaDate];
}
if (self.appID) {
[discription appendFormat:@"&app_id=\"%@\"",self.appID];
}
for (NSString * key in [self.extraParams allKeys]) {
[discription appendFormat:@"&%@=\"%@\"", key, [self.extraParams objectForKey:key]];
}
return discription;
}
@end