123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // 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.rmbAmount) {
- [discription appendFormat:@"&rmb_fee=\"%@\"", self.rmbAmount];
- }
- if (self.currency) {
- [discription appendFormat:@"¤cy=\"%@\"", self.currency];
- }
- 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];
- }
- if (self.forexbiz) {
- [discription appendFormat:@"&forex_biz=\"%@\"",self.forexbiz];
- }
- if (self.productCode) {
- [discription appendFormat:@"&product_code=\"%@\"",self.productCode];
- }
- for (NSString * key in [self.extraParams allKeys]) {
- [discription appendFormat:@"&%@=\"%@\"", key, [self.extraParams objectForKey:key]];
- }
- return discription;
- }
- @end
|