Order.m 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.sellerID) {
  16. [discription appendFormat:@"&seller_id=\"%@\"", self.sellerID];
  17. }
  18. if (self.outTradeNO) {
  19. [discription appendFormat:@"&out_trade_no=\"%@\"", self.outTradeNO];
  20. }
  21. if (self.subject) {
  22. [discription appendFormat:@"&subject=\"%@\"", self.subject];
  23. }
  24. if (self.body) {
  25. [discription appendFormat:@"&body=\"%@\"", self.body];
  26. }
  27. if (self.totalFee) {
  28. [discription appendFormat:@"&total_fee=\"%@\"", self.totalFee];
  29. }
  30. if (self.notifyURL) {
  31. [discription appendFormat:@"&notify_url=\"%@\"", self.notifyURL];
  32. }
  33. if (self.service) {
  34. [discription appendFormat:@"&service=\"%@\"",self.service];//mobile.securitypay.pay
  35. }
  36. if (self.paymentType) {
  37. [discription appendFormat:@"&payment_type=\"%@\"",self.paymentType];//1
  38. }
  39. if (self.inputCharset) {
  40. [discription appendFormat:@"&_input_charset=\"%@\"",self.inputCharset];//utf-8
  41. }
  42. if (self.itBPay) {
  43. [discription appendFormat:@"&it_b_pay=\"%@\"",self.itBPay];//30m
  44. }
  45. if (self.showURL) {
  46. [discription appendFormat:@"&show_url=\"%@\"",self.showURL];//m.alipay.com
  47. }
  48. if (self.appID) {
  49. [discription appendFormat:@"&app_id=\"%@\"",self.appID];
  50. }
  51. for (NSString * key in [self.outContext allKeys]) {
  52. [discription appendFormat:@"&%@=\"%@\"", key, [self.outContext objectForKey:key]];
  53. }
  54. return discription;
  55. }
  56. @end