braintree-rails 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/CHANGELOG.md +12 -0
  4. data/Gemfile.lock +48 -34
  5. data/braintree-rails.gemspec +7 -7
  6. data/lib/braintree_rails/address.rb +1 -1
  7. data/lib/braintree_rails/address_validator.rb +1 -1
  8. data/lib/braintree_rails/api_error.rb +1 -1
  9. data/lib/braintree_rails/billing_address.rb +5 -1
  10. data/lib/braintree_rails/business_details.rb +1 -1
  11. data/lib/braintree_rails/credit_card.rb +2 -2
  12. data/lib/braintree_rails/customer.rb +2 -2
  13. data/lib/braintree_rails/individual_details.rb +1 -1
  14. data/lib/braintree_rails/merchant_account.rb +6 -2
  15. data/lib/braintree_rails/model.rb +7 -9
  16. data/lib/braintree_rails/persistence.rb +2 -20
  17. data/lib/braintree_rails/shipping_address.rb +5 -1
  18. data/lib/braintree_rails/transaction.rb +5 -5
  19. data/lib/braintree_rails/transaction_validator.rb +1 -1
  20. data/lib/braintree_rails/validator.rb +1 -1
  21. data/lib/braintree_rails/version.rb +1 -1
  22. data/spec/fixtures/merchant_account.xml +1 -1
  23. data/spec/fixtures/transaction_error.xml +65 -20
  24. data/spec/integration/braintree_rails/address_integration_spec.rb +6 -6
  25. data/spec/integration/braintree_rails/credit_card_integration_spec.rb +17 -17
  26. data/spec/integration/braintree_rails/customer_integration_spec.rb +17 -17
  27. data/spec/integration/braintree_rails/merchant_account_integration_spec.rb +11 -11
  28. data/spec/integration/braintree_rails/transaction_integration_spec.rb +24 -25
  29. data/spec/integration/integration_spec_helper.rb +2 -1
  30. data/spec/spec_helper.rb +1 -0
  31. data/spec/support/helper.rb +16 -2
  32. data/spec/unit/braintree_rails/add_on_spec.rb +10 -11
  33. data/spec/unit/braintree_rails/add_ons_spec.rb +3 -3
  34. data/spec/unit/braintree_rails/address_details_spec.rb +3 -3
  35. data/spec/unit/braintree_rails/address_spec.rb +26 -26
  36. data/spec/unit/braintree_rails/addresses_spec.rb +7 -7
  37. data/spec/unit/braintree_rails/business_details_spec.rb +8 -8
  38. data/spec/unit/braintree_rails/configuration_spec.rb +6 -6
  39. data/spec/unit/braintree_rails/credit_card_spec.rb +76 -76
  40. data/spec/unit/braintree_rails/credit_cards_spec.rb +11 -11
  41. data/spec/unit/braintree_rails/customer_spec.rb +44 -44
  42. data/spec/unit/braintree_rails/discount_spec.rb +10 -11
  43. data/spec/unit/braintree_rails/discounts_spec.rb +3 -3
  44. data/spec/unit/braintree_rails/funding_details_spec.rb +12 -12
  45. data/spec/unit/braintree_rails/individual_details_spec.rb +5 -5
  46. data/spec/unit/braintree_rails/luhn_10_validator_spec.rb +5 -5
  47. data/spec/unit/braintree_rails/merchant_account_spec.rb +14 -14
  48. data/spec/unit/braintree_rails/plan_spec.rb +12 -12
  49. data/spec/unit/braintree_rails/subscription_spec.rb +53 -53
  50. data/spec/unit/braintree_rails/subscriptions_spec.rb +4 -5
  51. data/spec/unit/braintree_rails/transaction_spec.rb +67 -55
  52. data/spec/unit/braintree_rails/transactions_spec.rb +9 -9
  53. data/spec/unit/braintree_rails/validation_error_spec.rb +4 -4
  54. data/spec/unit/braintree_rails/validator_spec.rb +7 -7
  55. metadata +35 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dabcaf3edf7c518f2ded8a0382de5ac2ef468ab
4
- data.tar.gz: 3e02fa5749ed2dbcfa863328cc2266312372a844
3
+ metadata.gz: beb78e264daf6f5aa910f0f22a037a401de719ee
4
+ data.tar.gz: 964ddabe92b7e24904d9fc2a7611c3eb7f57721f
5
5
  SHA512:
6
- metadata.gz: 431039d31483f5e450b067e32349b6987a843a4fd481000e8a8bebde02491af3baa54cf8b7b4e08b89eb20644c01a30d22924c14a781de20ed0ffd8be1d0a50f
7
- data.tar.gz: 2a113fb29727e0108217f22a72e7392b19f98d47d6d3a20c545a4dd5c44992df5000b6290eba874975e508fd5e078b100072edd74905b5c29f8fc6e01e08e7f8
6
+ metadata.gz: 45abffe047116fef0dff574b3bc833afa11e1c44af7c1019776b387f5f80123d0e4bf186200fa0f6bac331d1cda858080ef50d864d7656d367afb5d74c133c4e
7
+ data.tar.gz: 1c45542fe5e4ce03cd46a8b2e00f0a289c4f5fdbc643b7af83624c21962b317a09636c019eda5bd7b1b5fecd421ce1ddb300bfa5c126ab272b25e3e730af3745
@@ -2,10 +2,11 @@ language: ruby
2
2
  cache: bundler
3
3
  script: bundle exec rake ci:travis
4
4
  rvm:
5
- - 1.9.2
6
5
  - 1.9.3
7
6
  - 2.0.0
8
7
  - 2.1.0
8
+ - 2.1.1
9
+ - 2.1.2
9
10
  - jruby-19mode
10
11
  env:
11
12
  global:
@@ -1,6 +1,18 @@
1
1
  ## Unreleased (master)
2
+ ### Enhancements
3
+ * Added `service_fee_amount` to `BraintreeRails::Transaction`. (Thanks, @KELiON)
4
+ * Enhanced validation error parsing so that they can be customized/i18n-ed
5
+
6
+ ### Bug Fixes
7
+ * Fixed deprecation warnings about validator setup. (Thanks, @JWesorick)
8
+
9
+ ## v1.3.0 (74bd8df), Apr 18 2014
2
10
  ### Enhancements
3
11
  * Added Braintree Marketplace related models
12
+ * Allow device_data to be passed through for Fraud tools integration
13
+
14
+ ### Bug Fixes
15
+ * Fixed a bug where it failed to load some models under some circumstances. (Thanks, @mbhnyc and @tmak)
4
16
 
5
17
  ## v1.2.3 (a9f5bf4), Jan 21 2014
6
18
  ### Enhancements
@@ -1,50 +1,64 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (3.2.13)
5
- activesupport (= 3.2.13)
6
- builder (~> 3.0.0)
7
- activesupport (3.2.13)
8
- i18n (= 0.6.1)
9
- multi_json (~> 1.0)
10
- addressable (2.3.4)
11
- braintree (2.28.0)
4
+ activemodel (4.1.8)
5
+ activesupport (= 4.1.8)
6
+ builder (~> 3.1)
7
+ activesupport (4.1.8)
8
+ i18n (~> 0.6, >= 0.6.9)
9
+ json (~> 1.7, >= 1.7.7)
10
+ minitest (~> 5.1)
11
+ thread_safe (~> 0.1)
12
+ tzinfo (~> 1.1)
13
+ addressable (2.3.6)
14
+ braintree (2.38.0)
12
15
  builder (>= 2.0.0)
13
- builder (3.0.4)
14
- coveralls (0.7.0)
16
+ builder (3.2.2)
17
+ coveralls (0.7.2)
15
18
  multi_json (~> 1.3)
16
- rest-client
19
+ rest-client (= 1.6.7)
17
20
  simplecov (>= 0.7)
18
- term-ansicolor
19
- thor
20
- crack (0.3.2)
21
+ term-ansicolor (= 1.2.2)
22
+ thor (= 0.18.1)
23
+ crack (0.4.2)
24
+ safe_yaml (~> 1.0.0)
21
25
  diff-lcs (1.2.5)
22
- docile (1.1.3)
23
- i18n (0.6.1)
24
- mime-types (2.1)
25
- multi_json (1.9.0)
26
- rake (10.0.4)
26
+ docile (1.1.5)
27
+ i18n (0.6.11)
28
+ json (1.8.1)
29
+ mime-types (2.4.3)
30
+ minitest (5.4.3)
31
+ multi_json (1.10.1)
32
+ rake (10.4.2)
27
33
  rest-client (1.6.7)
28
34
  mime-types (>= 1.16)
29
- rspec (2.14.1)
30
- rspec-core (~> 2.14.0)
31
- rspec-expectations (~> 2.14.0)
32
- rspec-mocks (~> 2.14.0)
33
- rspec-core (2.14.8)
34
- rspec-expectations (2.14.5)
35
- diff-lcs (>= 1.1.3, < 2.0)
36
- rspec-mocks (2.14.6)
37
- simplecov (0.8.2)
35
+ rspec (3.1.0)
36
+ rspec-core (~> 3.1.0)
37
+ rspec-expectations (~> 3.1.0)
38
+ rspec-mocks (~> 3.1.0)
39
+ rspec-core (3.1.7)
40
+ rspec-support (~> 3.1.0)
41
+ rspec-expectations (3.1.2)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.1.0)
44
+ rspec-mocks (3.1.3)
45
+ rspec-support (~> 3.1.0)
46
+ rspec-support (3.1.2)
47
+ safe_yaml (1.0.4)
48
+ simplecov (0.9.1)
38
49
  docile (~> 1.1.0)
39
- multi_json
50
+ multi_json (~> 1.0)
40
51
  simplecov-html (~> 0.8.0)
41
52
  simplecov-html (0.8.0)
42
- term-ansicolor (1.3.0)
43
- tins (~> 1.0)
53
+ term-ansicolor (1.2.2)
54
+ tins (~> 0.8)
44
55
  thor (0.18.1)
45
- tins (1.0.0)
46
- webmock (1.11.0)
47
- addressable (>= 2.2.7)
56
+ thread_safe (0.3.4)
57
+ tins (0.13.2)
58
+ tzinfo (1.2.2)
59
+ thread_safe (~> 0.1)
60
+ webmock (1.20.4)
61
+ addressable (>= 2.3.6)
48
62
  crack (>= 0.3.2)
49
63
 
50
64
  PLATFORMS
@@ -12,11 +12,11 @@ Gem::Specification.new do |spec|
12
12
  spec.test_files = Dir['spec/**']
13
13
  spec.homepage = 'https://github.com/lyang/braintree-rails'
14
14
  spec.required_ruby_version = '>= 1.9.2'
15
- spec.add_runtime_dependency 'braintree', '>= 2.28.0'
16
- spec.add_runtime_dependency 'activemodel', '>= 3.0'
17
- spec.add_runtime_dependency 'activesupport', '>= 3.0'
18
- spec.add_development_dependency 'rake'
19
- spec.add_development_dependency 'rspec'
20
- spec.add_development_dependency 'webmock'
21
- spec.add_development_dependency 'coveralls'
15
+ spec.add_runtime_dependency 'braintree', '>= 2.28.0', '< 3'
16
+ spec.add_runtime_dependency 'activemodel', '>= 3.0', '< 5'
17
+ spec.add_runtime_dependency 'activesupport', '>= 3.0', '< 5'
18
+ spec.add_development_dependency 'rake', '~> 10'
19
+ spec.add_development_dependency 'rspec', '~> 3'
20
+ spec.add_development_dependency 'webmock', '~> 1'
21
+ spec.add_development_dependency 'coveralls', '~> 0'
22
22
  end
@@ -76,4 +76,4 @@ module BraintreeRails
76
76
  sync_country_name_attributes(attribute, index)
77
77
  end
78
78
  end
79
- end
79
+ end
@@ -8,4 +8,4 @@ module BraintreeRails
8
8
  [:postal_code, :presence => true, :format => { :with => /\A[- a-z0-9]+\z/i}, :if => Proc.new { |address| address.errors[:postal_code].blank? && Configuration.require_postal_code }]
9
9
  ]
10
10
  end
11
- end
11
+ end
@@ -12,4 +12,4 @@ module BraintreeRails
12
12
  "#<#{self.class} (#{code}) #{message}>"
13
13
  end
14
14
  end
15
- end
15
+ end
@@ -3,5 +3,9 @@ module BraintreeRails
3
3
  def self.braintree_model_name
4
4
  superclass.braintree_model_name
5
5
  end
6
+
7
+ def extract_errors(errors)
8
+ errors.for(:billing_address) || errors.for(:billing)
9
+ end
6
10
  end
7
- end
11
+ end
@@ -26,4 +26,4 @@ module BraintreeRails
26
26
  address.present? ? {:address => address.attributes_for(:as_association)} : {}
27
27
  end
28
28
  end
29
- end
29
+ end
@@ -45,7 +45,7 @@ module BraintreeRails
45
45
  end
46
46
 
47
47
  def add_errors(validation_errors)
48
- billing_address.add_errors(validation_errors.except(:base)) if billing_address
48
+ billing_address.add_errors(extract_errors(validation_errors)) if billing_address
49
49
  super(validation_errors)
50
50
  end
51
51
 
@@ -75,4 +75,4 @@ module BraintreeRails
75
75
  changed.include?(:expiration_month) || changed.include?(:expiration_year)
76
76
  end
77
77
  end
78
- end
78
+ end
@@ -29,7 +29,7 @@ module BraintreeRails
29
29
  end
30
30
 
31
31
  def add_errors(validation_errors)
32
- credit_card.add_errors(validation_errors.except(:base)) if credit_card
32
+ credit_card.add_errors(extract_errors(validation_errors)) if credit_card
33
33
  super(validation_errors)
34
34
  end
35
35
 
@@ -45,4 +45,4 @@ module BraintreeRails
45
45
  credit_card.present? ? {:credit_card => credit_card.attributes_for(action).except(:customer_id, :token)} : {}
46
46
  end
47
47
  end
48
- end
48
+ end
@@ -29,4 +29,4 @@ module BraintreeRails
29
29
  address.present? ? {:address => address.attributes_for(:as_association)} : {}
30
30
  end
31
31
  end
32
- end
32
+ end
@@ -20,9 +20,13 @@ module BraintreeRails
20
20
  after_create :reload, :if => :persisted?
21
21
 
22
22
  def add_errors(validation_errors)
23
+ propergate_errors_to_associations(extract_errors(validation_errors))
24
+ super(validation_errors)
25
+ end
26
+
27
+ def propergate_errors_to_associations(validation_errors)
23
28
  [individual, business, funding].each do |association|
24
- association.add_errors(validation_errors.except(:base)) if association
25
- super(validation_errors)
29
+ association.add_errors(validation_errors) if association
26
30
  end
27
31
  end
28
32
 
@@ -40,17 +40,15 @@ module BraintreeRails
40
40
  end
41
41
 
42
42
  def add_errors(validation_errors)
43
- validation_errors.each do |attribute, message|
44
- if attribute.to_s == 'base'
45
- Array(message).each do |msg|
46
- self.errors.add(attribute, msg)
47
- end
48
- elsif respond_to?(attribute)
49
- self.errors.add(attribute, message)
50
- end
43
+ Array(extract_errors(validation_errors)).each do |error|
44
+ self.errors.add(error.attribute.to_sym, error.code.to_sym, message:BraintreeRails::ApiError.new(error.message, error.code))
51
45
  end
52
46
  end
53
47
 
48
+ def extract_errors(validation_errors)
49
+ validation_errors.for(self.class.braintree_model_name.to_sym)
50
+ end
51
+
54
52
  def ==(other)
55
53
  return false unless other.is_a?(self.class) || other.is_a?(self.class.braintree_model_class)
56
54
  id == other.id
@@ -73,4 +71,4 @@ module BraintreeRails
73
71
  receiver.extend ClassMethods
74
72
  end
75
73
  end
76
- end
74
+ end
@@ -116,7 +116,7 @@ module BraintreeRails
116
116
  run_callbacks context do
117
117
  result = yield
118
118
  if result.respond_to?(:success?) && !result.success?
119
- add_errors(extract_errors(result))
119
+ add_errors(result.errors)
120
120
  false
121
121
  else
122
122
  new_record = result.respond_to?(self.class.braintree_model_name) ? result.send(self.class.braintree_model_name) : result
@@ -124,24 +124,6 @@ module BraintreeRails
124
124
  end
125
125
  end
126
126
  end
127
-
128
- def extract_errors(result)
129
- base_errors(result).merge(attribute_errors(result))
130
- end
131
-
132
- def base_errors(result)
133
- all_messages = result.message.split("\n")
134
- base_messages = all_messages - attribute_errors(result).values.map(&:to_s)
135
- base_messages.empty? ? {} : {'base' => base_messages}
136
- end
137
-
138
- def attribute_errors(result)
139
- result.errors.inject({}) do |hash, error|
140
- next hash if error.attribute.to_s == 'base'
141
- hash[error.attribute.to_s] = BraintreeRails::ApiError.new(error.message, error.code)
142
- hash
143
- end
144
- end
145
127
  end
146
128
 
147
129
  def self.included(receiver)
@@ -154,4 +136,4 @@ module BraintreeRails
154
136
  end
155
137
  end
156
138
  end
157
- end
139
+ end
@@ -3,5 +3,9 @@ module BraintreeRails
3
3
  def self.braintree_model_name
4
4
  superclass.braintree_model_name
5
5
  end
6
+
7
+ def extract_errors(errors)
8
+ errors.for(:shipping_address) || errors.for(:shipping)
9
+ end
6
10
  end
7
- end
11
+ end
@@ -6,7 +6,7 @@ module BraintreeRails
6
6
 
7
7
  define_attributes(
8
8
  :create => [
9
- :amount, :billing, :channel, :custom_fields, :customer_id, :descriptor, :merchant_account_id,
9
+ :amount, :billing, :channel, :custom_fields, :customer_id, :descriptor, :merchant_account_id, :service_fee_amount,
10
10
  :options, :order_id, :payment_method_token, :purchase_order_number, :recurring, :shipping,
11
11
  :tax_amount, :tax_exempt, :type, :venmo_sdk_payment_method_code, :device_data
12
12
  ],
@@ -64,7 +64,7 @@ module BraintreeRails
64
64
  end
65
65
 
66
66
  def add_errors(validation_errors)
67
- propergate_errors_to_associations(validation_errors)
67
+ propergate_errors_to_associations(extract_errors(validation_errors))
68
68
  super(validation_errors)
69
69
  end
70
70
 
@@ -80,9 +80,9 @@ module BraintreeRails
80
80
 
81
81
  protected
82
82
 
83
- def propergate_errors_to_associations(validation_errors)
83
+ def propergate_errors_to_associations(errors)
84
84
  [customer, credit_card, billing, shipping].each do |association|
85
- association.add_errors(validation_errors.except('base')) if association
85
+ association.add_errors(errors) if association
86
86
  end
87
87
  end
88
88
 
@@ -116,4 +116,4 @@ module BraintreeRails
116
116
  end
117
117
  end
118
118
  end
119
- end
119
+ end
@@ -8,7 +8,7 @@ module BraintreeRails
8
8
  [:status, :inclusion => {:in => [Braintree::Transaction::Status::Authorized, Braintree::Transaction::Status::SubmittedForSettlement]}, :on => :void]
9
9
  ]
10
10
 
11
- def setup(*)
11
+ def initialize(*)
12
12
  self.class.model_class.class_eval do
13
13
  define_model_callbacks :submit_for_settlement, :refund, :void
14
14
  end
@@ -27,7 +27,7 @@ module BraintreeRails
27
27
  name.chomp('Validator').constantize
28
28
  end
29
29
 
30
- def setup(*)
30
+ def initialize(*)
31
31
  self.class.setup
32
32
  end
33
33
 
@@ -1,3 +1,3 @@
1
1
  module BraintreeRails
2
- Version = "1.3.0"
2
+ Version = "1.4.0"
3
3
  end
@@ -4,4 +4,4 @@
4
4
  <id>default_merchant_account_id</id>
5
5
  <currency-iso-code>USD</currency-iso-code>
6
6
  <sub-merchant-account type="boolean">false</sub-merchant-account>
7
- </merchant-account>
7
+ </merchant-account>
@@ -1,44 +1,89 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <api-error-response>
3
- <message>Credit card type is not accepted by this merchant account.
4
- Credit card number is invalid.</message>
5
3
  <errors>
4
+ <errors type="array"/>
6
5
  <transaction>
6
+ <errors type="array">
7
+ <error>
8
+ <code>91577</code>
9
+ <attribute type="symbol">merchant_account_id</attribute>
10
+ <message>Merchant account does not support payment instrument.</message>
11
+ </error>
12
+ </errors>
13
+ <billing>
14
+ <errors type="array">
15
+ <error>
16
+ <code>81809</code>
17
+ <attribute type="symbol">postal_code</attribute>
18
+ <message>Postal code may contain no more than 9 letter or number characters.</message>
19
+ </error>
20
+ </errors>
21
+ </billing>
22
+ <shipping>
23
+ <errors type="array">
24
+ <error>
25
+ <code>81809</code>
26
+ <attribute type="symbol">postal_code</attribute>
27
+ <message>Postal code may contain no more than 9 letter or number characters.</message>
28
+ </error>
29
+ </errors>
30
+ </shipping>
7
31
  <credit-card>
8
32
  <errors type="array">
9
33
  <error>
10
- <code>81715</code>
11
- <message>Credit card number is invalid.</message>
34
+ <code>81703</code>
12
35
  <attribute type="symbol">number</attribute>
36
+ <message>Credit card type is not accepted by this merchant account.</message>
37
+ </error>
38
+ <error>
39
+ <code>81714</code>
40
+ <attribute type="symbol">number</attribute>
41
+ <message>Credit card number is required.</message>
42
+ </error>
43
+ <error>
44
+ <code>81725</code>
45
+ <attribute type="symbol">base</attribute>
46
+ <message>Credit card must include number, payment_method_nonce, or venmo_sdk_payment_method_code.</message>
13
47
  </error>
14
48
  </errors>
15
49
  </credit-card>
16
- <errors type="array"/>
17
- <billing>
18
- <errors type="array"/>
19
- </billing>
20
50
  </transaction>
21
- <errors type="array"/>
22
51
  </errors>
23
52
  <params>
24
53
  <transaction>
25
- <type>sale</type>
54
+ <device-session-id>66866b285afd0d816de617983444f13d</device-session-id>
55
+ <fraud-merchant-id>600000</fraud-merchant-id>
56
+ <amount>7</amount>
26
57
  <billing>
27
- <country-code-numeric>840</country-code-numeric>
58
+ <company>BraintreeRails</company>
59
+ <country-name>United States of America</country-name>
60
+ <first-name>Braintree</first-name>
61
+ <last-name>Rails</last-name>
62
+ <locality>San Francisco</locality>
63
+ <postal-code>1234567890</postal-code>
28
64
  <region>California</region>
29
- <first-name>Wall</first-name>
30
- <company>Pixar</company>
31
- <locality>Junk Montain</locality>
32
- <street-address>Junk Rd</street-address>
33
- <last-name>E</last-name>
34
- <postal-code>12345</postal-code>
65
+ <street-address>185 Berry St</street-address>
35
66
  </billing>
36
- <amount>2001</amount>
67
+ <shipping>
68
+ <company>BraintreeRails</company>
69
+ <country-name>United States of America</country-name>
70
+ <first-name>Braintree</first-name>
71
+ <last-name>Rails</last-name>
72
+ <locality>San Francisco</locality>
73
+ <postal-code>0123456789</postal-code>
74
+ <region>California</region>
75
+ <street-address>185 Berry St</street-address>
76
+ </shipping>
77
+ <type>sale</type>
37
78
  <credit-card>
38
79
  <expiration-month>01</expiration-month>
39
- <cardholder-name>Wall-E</cardholder-name>
40
80
  <expiration-year>1976</expiration-year>
41
81
  </credit-card>
42
82
  </transaction>
43
83
  </params>
44
- </api-error-response>
84
+ <message>Merchant account does not support payment instrument.
85
+ Credit card type is not accepted by this merchant account.
86
+ Credit card number is required.
87
+ Credit card must include number, payment_method_nonce, or venmo_sdk_payment_method_code.
88
+ Postal code may contain no more than 9 letter or number characters.</message>
89
+ </api-error-response>