Няма описание

Order.m 2.2KB

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