-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOrder.m
More file actions
executable file
·65 lines (56 loc) · 1.75 KB
/
Order.m
File metadata and controls
executable file
·65 lines (56 loc) · 1.75 KB
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
//
// 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.sellerID) {
[discription appendFormat:@"&seller_id=\"%@\"", self.sellerID];
}
if (self.outTradeNO) {
[discription appendFormat:@"&out_trade_no=\"%@\"", self.outTradeNO];
}
if (self.subject) {
[discription appendFormat:@"&subject=\"%@\"", self.subject];
}
if (self.body) {
[discription appendFormat:@"&body=\"%@\"", self.body];
}
if (self.totalFee) {
[discription appendFormat:@"&total_fee=\"%@\"", self.totalFee];
}
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.appID) {
[discription appendFormat:@"&app_id=\"%@\"",self.appID];
}
for (NSString * key in [self.outContext allKeys]) {
[discription appendFormat:@"&%@=\"%@\"", key, [self.outContext objectForKey:key]];
}
return discription;
}
@end