braintree 2.104.1 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/braintree.gemspec +7 -4
  4. data/lib/braintree.rb +7 -18
  5. data/lib/braintree/account_updater_daily_report.rb +1 -1
  6. data/lib/braintree/address.rb +1 -23
  7. data/lib/braintree/apple_pay.rb +1 -1
  8. data/lib/braintree/apple_pay_card.rb +1 -1
  9. data/lib/braintree/apple_pay_options.rb +1 -1
  10. data/lib/braintree/authorization_adjustment.rb +1 -1
  11. data/lib/braintree/base_module.rb +6 -0
  12. data/lib/braintree/bin_data.rb +9 -2
  13. data/lib/braintree/client_token.rb +1 -1
  14. data/lib/braintree/configuration.rb +12 -12
  15. data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
  16. data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
  17. data/lib/braintree/credit_card.rb +2 -77
  18. data/lib/braintree/credit_card_gateway.rb +7 -36
  19. data/lib/braintree/credit_card_verification.rb +18 -5
  20. data/lib/braintree/credit_card_verification_search.rb +1 -1
  21. data/lib/braintree/customer.rb +5 -76
  22. data/lib/braintree/customer_gateway.rb +0 -23
  23. data/lib/braintree/customer_search.rb +1 -1
  24. data/lib/braintree/disbursement.rb +1 -1
  25. data/lib/braintree/dispute.rb +2 -8
  26. data/lib/braintree/dispute/{history_event.rb → status_history.rb} +3 -1
  27. data/lib/braintree/dispute_gateway.rb +4 -9
  28. data/lib/braintree/dispute_search.rb +2 -2
  29. data/lib/braintree/document_upload.rb +1 -1
  30. data/lib/braintree/error_codes.rb +151 -170
  31. data/lib/braintree/exceptions.rb +5 -3
  32. data/lib/braintree/gateway.rb +0 -14
  33. data/lib/braintree/{android_pay_card.rb → google_pay_card.rb} +2 -3
  34. data/lib/braintree/granted_payment_instrument_update.rb +1 -1
  35. data/lib/braintree/graphql_client.rb +7 -7
  36. data/lib/braintree/http.rb +3 -3
  37. data/lib/braintree/local_payment_completed.rb +1 -1
  38. data/lib/braintree/local_payment_reversed.rb +19 -0
  39. data/lib/braintree/merchant.rb +1 -1
  40. data/lib/braintree/merchant_account.rb +1 -1
  41. data/lib/braintree/merchant_account_gateway.rb +3 -1
  42. data/lib/braintree/merchant_gateway.rb +1 -1
  43. data/lib/braintree/modification.rb +1 -1
  44. data/lib/braintree/oauth_credentials.rb +1 -1
  45. data/lib/braintree/oauth_gateway.rb +5 -5
  46. data/lib/braintree/payment_instrument_type.rb +10 -14
  47. data/lib/braintree/payment_method_gateway.rb +8 -13
  48. data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
  49. data/lib/braintree/payment_method_parser.rb +1 -8
  50. data/lib/braintree/plan.rb +1 -1
  51. data/lib/braintree/processor_response_types.rb +3 -3
  52. data/lib/braintree/resource_collection.rb +8 -3
  53. data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
  54. data/lib/braintree/risk_data.rb +3 -1
  55. data/lib/braintree/samsung_pay_card.rb +1 -1
  56. data/lib/braintree/settlement_batch_summary.rb +2 -2
  57. data/lib/braintree/subscription.rb +11 -11
  58. data/lib/braintree/successful_result.rb +0 -1
  59. data/lib/braintree/test/credit_card.rb +1 -0
  60. data/lib/braintree/test/nonce.rb +4 -23
  61. data/lib/braintree/three_d_secure_info.rb +22 -12
  62. data/lib/braintree/transaction.rb +44 -104
  63. data/lib/braintree/transaction/disbursement_details.rb +1 -0
  64. data/lib/braintree/transaction/{android_pay_details.rb → google_pay_details.rb} +1 -1
  65. data/lib/braintree/transaction/installment.rb +28 -0
  66. data/lib/braintree/transaction/installment/adjustment.rb +33 -0
  67. data/lib/braintree/transaction/paypal_details.rb +1 -0
  68. data/lib/braintree/transaction/subscription_details.rb +2 -0
  69. data/lib/braintree/transaction_gateway.rb +37 -25
  70. data/lib/braintree/transaction_line_item.rb +1 -1
  71. data/lib/braintree/transaction_search.rb +3 -2
  72. data/lib/braintree/unknown_payment_method.rb +1 -1
  73. data/lib/braintree/us_bank_account.rb +3 -3
  74. data/lib/braintree/us_bank_account_verification.rb +1 -1
  75. data/lib/braintree/us_bank_account_verification_gateway.rb +1 -1
  76. data/lib/braintree/util.rb +21 -6
  77. data/lib/braintree/venmo_account.rb +1 -1
  78. data/lib/braintree/version.rb +3 -3
  79. data/lib/braintree/visa_checkout_card.rb +2 -2
  80. data/lib/braintree/webhook_notification.rb +28 -29
  81. data/lib/braintree/webhook_notification_gateway.rb +5 -5
  82. data/lib/braintree/webhook_testing_gateway.rb +10 -43
  83. data/lib/braintree/xml/generator.rb +5 -4
  84. data/lib/braintree/xml/libxml.rb +1 -0
  85. data/lib/braintree/xml/parser.rb +21 -44
  86. data/spec/integration/braintree/add_on_spec.rb +1 -1
  87. data/spec/integration/braintree/address_spec.rb +26 -113
  88. data/spec/integration/braintree/advanced_search_spec.rb +45 -45
  89. data/spec/integration/braintree/apple_pay_spec.rb +3 -3
  90. data/spec/integration/braintree/braintree_gateway_spec.rb +2 -1
  91. data/spec/integration/braintree/client_api/client_token_spec.rb +14 -14
  92. data/spec/integration/braintree/client_api/spec_helper.rb +5 -31
  93. data/spec/integration/braintree/credit_card_spec.rb +130 -593
  94. data/spec/integration/braintree/credit_card_verification_search_spec.rb +2 -2
  95. data/spec/integration/braintree/credit_card_verification_spec.rb +1 -1
  96. data/spec/integration/braintree/customer_search_spec.rb +8 -8
  97. data/spec/integration/braintree/customer_spec.rb +336 -509
  98. data/spec/integration/braintree/dispute_search_spec.rb +6 -6
  99. data/spec/integration/braintree/dispute_spec.rb +6 -7
  100. data/spec/integration/braintree/error_codes_spec.rb +1 -1
  101. data/spec/integration/braintree/http_spec.rb +2 -2
  102. data/spec/integration/braintree/merchant_account_spec.rb +25 -26
  103. data/spec/integration/braintree/merchant_spec.rb +14 -14
  104. data/spec/integration/braintree/oauth_spec.rb +11 -11
  105. data/spec/integration/braintree/payment_method_nonce_spec.rb +12 -12
  106. data/spec/integration/braintree/payment_method_spec.rb +403 -269
  107. data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +17 -13
  108. data/spec/integration/braintree/paypal_account_spec.rb +28 -28
  109. data/spec/integration/braintree/samsung_pay_card_spec.rb +9 -9
  110. data/spec/integration/braintree/settlement_batch_summary_spec.rb +8 -8
  111. data/spec/integration/braintree/subscription_spec.rb +144 -149
  112. data/spec/integration/braintree/test/transaction_amounts_spec.rb +2 -2
  113. data/spec/integration/braintree/test_transaction_spec.rb +10 -10
  114. data/spec/integration/braintree/transaction_search_spec.rb +96 -70
  115. data/spec/integration/braintree/transaction_spec.rb +832 -904
  116. data/spec/integration/braintree/transaction_us_bank_account_spec.rb +32 -26
  117. data/spec/integration/braintree/us_bank_account_spec.rb +6 -6
  118. data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +7 -7
  119. data/spec/integration/braintree/us_bank_account_verification_spec.rb +8 -8
  120. data/spec/integration/braintree/visa_checkout_card_spec.rb +5 -5
  121. data/spec/integration/spec_helper.rb +10 -7
  122. data/spec/oauth_test_helper.rb +1 -1
  123. data/spec/script/httpsd.rb +6 -6
  124. data/spec/spec_helper.rb +6 -14
  125. data/spec/unit/braintree/address_spec.rb +1 -9
  126. data/spec/unit/braintree/apple_pay_card_spec.rb +1 -1
  127. data/spec/unit/braintree/client_token_spec.rb +2 -2
  128. data/spec/unit/braintree/configuration_spec.rb +42 -42
  129. data/spec/unit/braintree/credit_card_spec.rb +9 -28
  130. data/spec/unit/braintree/credit_card_verification_search_spec.rb +1 -1
  131. data/spec/unit/braintree/credit_card_verification_spec.rb +8 -4
  132. data/spec/unit/braintree/customer_spec.rb +5 -16
  133. data/spec/unit/braintree/disbursement_spec.rb +7 -7
  134. data/spec/unit/braintree/dispute_spec.rb +9 -20
  135. data/spec/unit/braintree/error_result_spec.rb +5 -5
  136. data/spec/unit/braintree/errors_spec.rb +8 -8
  137. data/spec/unit/braintree/http_spec.rb +8 -8
  138. data/spec/unit/braintree/merchant_account_spec.rb +1 -1
  139. data/spec/unit/braintree/payment_method_spec.rb +1 -1
  140. data/spec/unit/braintree/paypal_account_spec.rb +2 -2
  141. data/spec/unit/braintree/resource_collection_spec.rb +30 -1
  142. data/spec/unit/braintree/risk_data_spec.rb +9 -5
  143. data/spec/unit/braintree/subscription_search_spec.rb +1 -1
  144. data/spec/unit/braintree/successful_result_spec.rb +1 -1
  145. data/spec/unit/braintree/three_d_secure_info_spec.rb +32 -14
  146. data/spec/unit/braintree/transaction/credit_card_details_spec.rb +3 -3
  147. data/spec/unit/braintree/transaction/customer_details_spec.rb +1 -1
  148. data/spec/unit/braintree/transaction/deposit_details_spec.rb +2 -2
  149. data/spec/unit/braintree/transaction/installment_spec.rb +25 -0
  150. data/spec/unit/braintree/transaction/paypal_details_spec.rb +3 -1
  151. data/spec/unit/braintree/transaction_search_spec.rb +12 -12
  152. data/spec/unit/braintree/transaction_spec.rb +25 -51
  153. data/spec/unit/braintree/util_spec.rb +55 -21
  154. data/spec/unit/braintree/validation_error_collection_spec.rb +36 -36
  155. data/spec/unit/braintree/webhook_notification_spec.rb +73 -57
  156. data/spec/unit/braintree/xml/parser_spec.rb +21 -16
  157. data/spec/unit/braintree/xml_spec.rb +31 -31
  158. metadata +30 -31
  159. data/lib/braintree/amex_express_checkout_card.rb +0 -40
  160. data/lib/braintree/coinbase_account.rb +0 -34
  161. data/lib/braintree/europe_bank_account.rb +0 -36
  162. data/lib/braintree/europe_bank_account_gateway.rb +0 -17
  163. data/lib/braintree/ideal_payment.rb +0 -61
  164. data/lib/braintree/ideal_payment_gateway.rb +0 -19
  165. data/lib/braintree/masterpass_card.rb +0 -83
  166. data/lib/braintree/settlement_batch.rb +0 -0
  167. data/lib/braintree/transaction/amex_express_checkout_details.rb +0 -21
  168. data/lib/braintree/transaction/coinbase_details.rb +0 -16
  169. data/lib/braintree/transaction/ideal_payment_details.rb +0 -19
  170. data/lib/braintree/transaction/masterpass_card_details.rb +0 -49
  171. data/lib/braintree/transparent_redirect.rb +0 -40
  172. data/lib/braintree/transparent_redirect_gateway.rb +0 -105
  173. data/lib/braintree/xml/rexml.rb +0 -71
  174. data/spec/hacks/tcp_socket.rb +0 -18
  175. data/spec/integration/braintree/coinbase_spec.rb +0 -34
  176. data/spec/integration/braintree/masterpass_card_spec.rb +0 -97
  177. data/spec/integration/braintree/transparent_redirect_spec.rb +0 -268
  178. data/spec/unit/braintree/transparent_redirect_spec.rb +0 -223
  179. data/spec/unit/braintree/xml/rexml_spec.rb +0 -51
@@ -37,27 +37,27 @@ module Braintree
37
37
 
38
38
  module ApplePay
39
39
  ApplePayCardsAreNotAccepted = "83501"
40
- CustomerIdIsRequiredForVaulting = "83502"
41
- TokenIsInUse = "93503"
42
- PaymentMethodNonceConsumed = "93504"
43
- PaymentMethodNonceUnknown = "93505"
44
- PaymentMethodNonceLocked = "93506"
45
- PaymentMethodNonceCardTypeIsNotAccepted = "83518"
46
40
  CannotUpdateApplePayCardUsingPaymentMethodNonce = "93507"
47
- NumberIsRequired = "93508"
48
- ExpirationMonthIsRequired = "93509"
49
- ExpirationYearIsRequired = "93510"
41
+ CertificateInvalid = "93517"
42
+ CertificateMismatch = "93519"
50
43
  CryptogramIsRequired = "93511"
44
+ CustomerIdIsRequiredForVaulting = "83502"
51
45
  DecryptionFailed = "83512"
52
46
  Disabled = "93513"
53
- MerchantNotConfigured = "93514"
47
+ ExpirationMonthIsRequired = "93509"
48
+ ExpirationYearIsRequired = "93510"
49
+ InvalidToken = "83520"
50
+ KeyMismatchStoringCertificate = "93522"
54
51
  MerchantKeysAlreadyConfigured = "93515"
55
52
  MerchantKeysNotConfigured = "93516"
56
- CertificateInvalid = "93517"
57
- CertificateMismatch = "93519"
58
- InvalidToken = "83520"
53
+ MerchantNotConfigured = "93514"
54
+ NumberIsRequired = "93508"
55
+ PaymentMethodNonceCardTypeIsNotAccepted = "83518"
56
+ PaymentMethodNonceConsumed = "93504"
57
+ PaymentMethodNonceLocked = "93506"
58
+ PaymentMethodNonceUnknown = "93505"
59
59
  PrivateKeyMismatch = "93521"
60
- KeyMismatchStoringCertificate = "93522"
60
+ TokenIsInUse = "93503"
61
61
  end
62
62
 
63
63
  module CreditCard
@@ -68,6 +68,7 @@ module Braintree
68
68
  CardholderNameIsTooLong = "81723"
69
69
  CreditCardTypeIsNotAccepted = "81703"
70
70
  CreditCardTypeIsNotAcceptedBySubscriptionMerchantAccount = "81718"
71
+ CurrencyCodeNotSupportedByMerchantAccount = "91760"
71
72
  CustomerIdIsInvalid = "91705"
72
73
  CustomerIdIsRequired = "91704"
73
74
  CvvIsInvalid = "81707"
@@ -100,9 +101,9 @@ module Braintree
100
101
  TokenIsRequired = "91722"
101
102
  TokenIsTooLong = "91720"
102
103
  VenmoSDKPaymentMethodCodeCardTypeIsNotAccepted = "91726"
103
- VerificationNotSupportedOnThisMerchantAccount = "91730"
104
104
  VerificationAccountTypeIsInvalid = "91757"
105
105
  VerificationAccountTypeNotSupported = "91758"
106
+ VerificationNotSupportedOnThisMerchantAccount = "91730"
106
107
 
107
108
  module Options
108
109
  UpdateExistingTokenIsInvalid = "91723"
@@ -112,10 +113,10 @@ module Braintree
112
113
  VerificationAmountFormatIsInvalid = "91740"
113
114
  VerificationAmountIsTooLarge = "91752"
114
115
  VerificationAmountNotSupportedByProcessor = "91741"
116
+ VerificationMerchantAccountCannotBeSubMerchantAccount = "91755"
115
117
  VerificationMerchantAccountIdIsInvalid = "91728"
116
118
  VerificationMerchantAccountIsForbidden = "91743"
117
119
  VerificationMerchantAccountIsSuspended = "91742"
118
- VerificationMerchantAccountCannotBeSubMerchantAccount = "91755"
119
120
  end
120
121
  end
121
122
 
@@ -141,47 +142,46 @@ module Braintree
141
142
  end
142
143
 
143
144
  module Descriptor
144
- NameFormatIsInvalid = "92201"
145
- PhoneFormatIsInvalid = "92202"
146
145
  DynamicDescriptorsDisabled = "92203"
147
146
  InternationalNameFormatIsInvalid = "92204"
148
147
  InternationalPhoneFormatIsInvalid = "92205"
148
+ NameFormatIsInvalid = "92201"
149
+ PhoneFormatIsInvalid = "92202"
149
150
  UrlFormatIsInvalid = "92206"
150
151
  end
151
152
 
152
153
  module Dispute
153
- CanOnlyAddEvidenceToOpenDispute = "95701"
154
- CanOnlyRemoveEvidenceFromOpenDispute = "95702"
155
- CanOnlyAddEvidenceDocumentToDispute = "95703"
156
154
  CanOnlyAcceptOpenDispute = "95704"
157
- CanOnlyFinalizeOpenDispute = "95705"
155
+ CanOnlyAddEvidenceDocumentToDispute = "95703"
156
+ CanOnlyAddEvidenceToOpenDispute = "95701"
158
157
  CanOnlyCreateEvidenceWithValidCategory = "95706"
159
- EvidenceContentDateInvalid = "95707"
160
- EvidenceContentTooLong = "95708"
161
- EvidenceContentARNTooLong = "95709"
162
- EvidenceContentPhoneTooLong = "95710"
163
- EvidenceCategoryTextOnly = "95711"
158
+ CanOnlyFinalizeOpenDispute = "95705"
159
+ CanOnlyRemoveEvidenceFromOpenDispute = "95702"
160
+ DigitalGoodsMissingDownloadDate = "95721"
161
+ DigitalGoodsMissingEvidence = "95720"
164
162
  EvidenceCategoryDocumentOnly = "95712"
165
- EvidenceCategoryNotForReasonCode = "95713"
166
163
  EvidenceCategoryDuplicate = "95714"
164
+ EvidenceCategoryNotForReasonCode = "95713"
165
+ EvidenceCategoryTextOnly = "95711"
166
+ EvidenceContentARNTooLong = "95709"
167
+ EvidenceContentDateInvalid = "95707"
167
168
  EvidenceContentEmailInvalid = "95715"
168
-
169
- DigitalGoodsMissingEvidence = "95720"
170
- DigitalGoodsMissingDownloadDate = "95721"
169
+ EvidenceContentPhoneTooLong = "95710"
170
+ EvidenceContentTooLong = "95708"
171
171
  NonDisputedPriorTransactionEvidenceMissingARN = "95722"
172
172
  NonDisputedPriorTransactionEvidenceMissingDate = "95723"
173
- RecurringTransactionEvidenceMissingDate = "95724"
174
173
  RecurringTransactionEvidenceMissingARN = "95725"
174
+ RecurringTransactionEvidenceMissingDate = "95724"
175
175
  ValidEvidenceRequiredToFinalize = "95726"
176
176
  end
177
177
 
178
178
  module DocumentUpload
179
- KindIsInvalid = "84901"
180
- FileIsTooLarge = "84902"
181
- FileTypeIsInvalid = "84903"
179
+ FileIsEmpty = "84906"
182
180
  FileIsMalformedOrEncrypted = "84904"
181
+ FileIsTooLarge = "84902"
183
182
  FileIsTooLong = "84905"
184
- FileIsEmpty = "84906"
183
+ FileTypeIsInvalid = "84903"
184
+ KindIsInvalid = "84901"
185
185
  end
186
186
 
187
187
  module PayPalAccount
@@ -203,28 +203,6 @@ module Braintree
203
203
  TokenIsInUse = "92906"
204
204
  end
205
205
 
206
- module EuropeBankAccount
207
- IBANIsRequired = "93001"
208
- BICIsRequired = "93002"
209
- AccountHolderNameIsRequired = "93003"
210
- end
211
-
212
- module SEPAMandate
213
- AccountHolderNameIsRequired = "83301"
214
- BICIsRequired = "83302"
215
- IBANIsRequired = "83303"
216
- TypeIsRequired = "93304"
217
- IBANInvalidCharacter = "83305"
218
- BICInvalidCharacter = "83306"
219
- BICLengthIsInvalid = "83307"
220
- BICUnsupportedCountry = "83308"
221
- IBANUnsupportedCountry = "83309"
222
- IBANInvalidFormat = "83310"
223
- LocaleIsUnsupported = "93311"
224
- BillingAddressIsInvalid = "93312"
225
- TypeIsInvalid = "93313"
226
- end
227
-
228
206
  module Subscription
229
207
  BillingDayOfMonthCannotBeUpdated = "91918"
230
208
  BillingDayOfMonthIsInvalid = "91914"
@@ -293,9 +271,9 @@ module Braintree
293
271
  end
294
272
 
295
273
  module Transaction
274
+ AdjustmentAmountMustBeGreaterThanZero = "95605"
296
275
  AmountCannotBeNegative = "81501"
297
276
  AmountDoesNotMatch3DSecureAmount = "91585"
298
- AmountDoesNotMatchIdealPaymentAmount = "915144"
299
277
  AmountFormatIsInvalid = "81503" # Keep for backwards compatibility
300
278
  AmountIsInvalid = "81503" # Keep for backwards compatibility
301
279
  AmountIsRequired = "81502"
@@ -325,11 +303,12 @@ module Braintree
325
303
  CannotUpdateTransactionDetailsNotSubmittedForSettlement = "915129"
326
304
  ChannelIsTooLong = "91550"
327
305
  CreditCardIsRequired = "91508"
306
+ CurrencyCodeNotSupportedByMerchantAccount = "915214"
307
+ CustomFieldIsInvalid = "91526"
308
+ CustomFieldIsTooLong = "81527"
328
309
  CustomerDefaultPaymentMethodCardTypeIsNotAccepted = "81509"
329
310
  CustomerDoesNotHaveCreditCard = "91511"
330
311
  CustomerIdIsInvalid = "91510"
331
- CustomFieldIsInvalid = "91526"
332
- CustomFieldIsTooLong = "81527"
333
312
  DiscountAmountCannotBeNegative = "915160"
334
313
  DiscountAmountFormatIsInvalid = "915159"
335
314
  DiscountAmountIsTooLarge = "915161"
@@ -337,19 +316,18 @@ module Braintree
337
316
  FailedAuthAdjustmentHardDecline = "95602"
338
317
  FinalAuthSubmitForSettlementForDifferentAmount = "95601"
339
318
  HasAlreadyBeenRefunded = "91512"
340
- IdealPaymentNotComplete = "815141"
341
- IdealPaymentsCannotBeVaulted = "915150"
342
319
  LineItemsExpected = "915158"
343
320
  MerchantAccountDoesNotMatch3DSecureMerchantAccount = "91584"
344
- MerchantAccountDoesNotMatchIdealPaymentMerchantAccount = "915143"
345
321
  MerchantAccountDoesNotSupportMOTO = "91558"
346
322
  MerchantAccountDoesNotSupportRefunds = "91547"
347
323
  MerchantAccountIdDoesNotMatchSubscription = "915180"
348
324
  MerchantAccountIdIsInvalid = "91513"
349
325
  MerchantAccountIsSuspended = "91514"
350
- OrderIdDoesNotMatchIdealPaymentOrderId = "91503"
351
- OrderIdIsRequiredWithIdealPayment = "91502"
326
+ NoNetAmountToPerformAuthAdjustment = "95606"
352
327
  OrderIdIsTooLong = "91501"
328
+ PayPalAuthExpired = "91579"
329
+ PayPalNotEnabled = "91576"
330
+ PayPalVaultRecordMissingData = "91583"
353
331
  PaymentInstrumentNotSupportedByMerchantAccount = "91577"
354
332
  PaymentInstrumentTypeIsNotAccepted = "915101"
355
333
  PaymentInstrumentWithExternalVaultIsInvalid = "915176"
@@ -364,14 +342,14 @@ module Braintree
364
342
  PaymentMethodNonceUnknown = "91565"
365
343
  PaymentMethodTokenCardTypeIsNotAccepted = "91517"
366
344
  PaymentMethodTokenIsInvalid = "91518"
367
- PayPalAuthExpired = "91579"
368
- PayPalNotEnabled = "91576"
369
- PayPalVaultRecordMissingData = "91583"
370
345
  ProcessorAuthorizationCodeCannotBeSet = "91519"
371
346
  ProcessorAuthorizationCodeIsInvalid = "81520"
372
347
  ProcessorDoesNotSupportAuths = "915104"
348
+ ProcessorDoesNotSupportAuthAdjustment = "915222"
373
349
  ProcessorDoesNotSupportCredits = "91546"
350
+ ProcessorDoesNotSupportIncrementalAuth = "915220"
374
351
  ProcessorDoesNotSupportMotoForCardType = "915195"
352
+ ProcessorDoesNotSupportPartialAuthReversal = "915221"
375
353
  ProcessorDoesNotSupportPartialSettlement = "915102"
376
354
  ProcessorDoesNotSupportUpdatingDescriptor = "915108"
377
355
  ProcessorDoesNotSupportUpdatingOrderId = "915107"
@@ -383,6 +361,7 @@ module Braintree
383
361
  RefundAmountIsTooLarge = "91521"
384
362
  RefundAuthHardDeclined = "915200"
385
363
  RefundAuthSoftDeclined = "915201"
364
+ ScaExemptionInvalid = "915213"
386
365
  ServiceFeeAmountCannotBeNegative = "91554"
387
366
  ServiceFeeAmountFormatIsInvalid = "91555"
388
367
  ServiceFeeAmountIsTooLarge = "91556"
@@ -424,6 +403,8 @@ module Braintree
424
403
  ThreeDSecureTransactionPaymentMethodDoesntMatchThreeDSecureAuthenticationPaymentMethod = "915197"
425
404
  ThreeDSecureXidIsRequired = "915115"
426
405
  TooManyLineItems = "915157"
406
+ TransactionIsNotEligibleForAdjustment = "915219"
407
+ TransactionMustBeInStateAuthorized = "915218"
427
408
  TransactionSourceIsInvalid = "915133"
428
409
  TypeIsInvalid = "91523"
429
410
  TypeIsRequired = "91524"
@@ -451,37 +432,36 @@ module Braintree
451
432
  IndustryTypeIsInvalid = "93401"
452
433
 
453
434
  module Lodging
454
- EmptyData = "93402"
455
- FolioNumberIsInvalid = "93403"
435
+ AdvancedDepositIndicatorIsInvalid = "93440"
456
436
  CheckInDateIsInvalid = "93404"
457
437
  CheckOutDateIsInvalid = "93405"
458
438
  CheckOutDateMustFollowCheckInDate = "93406"
459
- UnknownDataField = "93407"
460
- RoomRateMustBeGreaterThanZero = "93433"
439
+ EmptyData = "93402"
440
+ FireSafetyIndicatorIsInvalid = "93441"
441
+ FolioNumberIsInvalid = "93403"
442
+ NoShowIndicatorIsInvalid = "93439"
443
+ PropertyPhoneIsInvalid = "93442"
461
444
  RoomRateFormatIsInvalid = "93434"
462
445
  RoomRateIsTooLarge = "93435"
463
- RoomTaxMustBeGreaterThanZero = "93436"
446
+ RoomRateMustBeGreaterThanZero = "93433"
464
447
  RoomTaxFormatIsInvalid = "93437"
465
448
  RoomTaxIsTooLarge = "93438"
466
- NoShowIndicatorIsInvalid = "93439"
467
- AdvancedDepositIndicatorIsInvalid = "93440"
468
- FireSafetyIndicatorIsInvalid = "93441"
469
- PropertyPhoneIsInvalid = "93442"
449
+ RoomTaxMustBeGreaterThanZero = "93436"
450
+ UnknownDataField = "93407"
470
451
  end
471
452
 
472
453
  module TravelCruise
473
- EmptyData = "93408"
474
- UnknownDataField = "93409"
475
- TravelPackageIsInvalid = "93410"
476
454
  DepartureDateIsInvalid = "93411"
455
+ EmptyData = "93408"
477
456
  LodgingCheckInDateIsInvalid = "93412"
478
457
  LodgingCheckOutDateIsInvalid = "93413"
458
+ TravelPackageIsInvalid = "93410"
459
+ UnknownDataField = "93409"
479
460
  end
480
461
 
481
462
  module TravelFlight
482
- EmptyData = "93414"
483
- UnknownDataField = "93415"
484
463
  CustomerCodeIsTooLong = "93416"
464
+ EmptyData = "93414"
485
465
  FareAmountCannotBeNegative = "93417"
486
466
  FareAmountFormatIsInvalid = "93418"
487
467
  FareAmountIsTooLarge = "93419"
@@ -490,14 +470,15 @@ module Braintree
490
470
  FeeAmountIsTooLarge = "93422"
491
471
  IssuedDateFormatIsInvalid = "93423"
492
472
  IssuingCarrierCodeIsTooLong = "93424"
473
+ LegsExpected = "93431"
493
474
  PassengerMiddleInitialIsTooLong = "93425"
494
475
  RestrictedTicketIsRequired = "93426"
495
476
  TaxAmountCannotBeNegative = "93427"
496
477
  TaxAmountFormatIsInvalid = "93428"
497
478
  TaxAmountIsTooLarge = "93429"
498
479
  TicketNumberIsTooLong = "93430"
499
- LegsExpected = "93431"
500
480
  TooManyLegs = "93432"
481
+ UnknownDataField = "93415"
501
482
  end
502
483
 
503
484
  module Leg
@@ -526,30 +507,30 @@ module Braintree
526
507
  end
527
508
 
528
509
  module AdditionalCharge
529
- KindIsInvalid = "96601"
530
- KindMustBeUnique = "96602"
531
- AmountMustBeGreaterThanZero = "96603"
532
510
  AmountFormatIsInvalid = "96604"
533
- AmountIsTooLarge = "96605"
534
511
  AmountIsRequired = "96606"
512
+ AmountIsTooLarge = "96605"
513
+ AmountMustBeGreaterThanZero = "96603"
514
+ KindIsInvalid = "96601"
515
+ KindMustBeUnique = "96602"
535
516
  end
536
517
  end
537
518
 
538
519
  module ExternalVault
539
- StatusIsInvalid = "915175"
520
+ # NEXT_MAJOR_VERSION remove this validation error as it is no longer returned by the gateway
540
521
  CardTypeIsInvalid = "915178"
541
- StatusWithPreviousNetworkTransactionIdIsInvalid = "915177"
542
522
  PreviousNetworkTransactionIdIsInvalid = "915179"
523
+ StatusIsInvalid = "915175"
524
+ StatusWithPreviousNetworkTransactionIdIsInvalid = "915177"
543
525
  end
544
526
  end
545
527
 
546
528
  module TransactionLineItem
547
529
  CommodityCodeIsTooLong = "95801"
548
530
  DescriptionIsTooLong = "95803"
531
+ DiscountAmountCannotBeNegative = "95806"
549
532
  DiscountAmountFormatIsInvalid = "95804"
550
533
  DiscountAmountIsTooLarge = "95805"
551
- DiscountAmountMustBeGreaterThanZero = "95806" # Deprecated as the amount may be zero. Use DiscountAmountCannotBeNegative.
552
- DiscountAmountCannotBeNegative = "95806"
553
534
  KindIsInvalid = "95807"
554
535
  KindIsRequired = "95808"
555
536
  NameIsRequired = "95822"
@@ -558,6 +539,9 @@ module Braintree
558
539
  QuantityFormatIsInvalid = "95810"
559
540
  QuantityIsRequired = "95811"
560
541
  QuantityIsTooLarge = "95812"
542
+ TaxAmountCannotBeNegative = "95829"
543
+ TaxAmountFormatIsInvalid = "95827"
544
+ TaxAmountIsTooLarge = "95828"
561
545
  TotalAmountFormatIsInvalid = "95813"
562
546
  TotalAmountIsRequired = "95814"
563
547
  TotalAmountIsTooLarge = "95815"
@@ -567,13 +551,9 @@ module Braintree
567
551
  UnitAmountIsTooLarge = "95819"
568
552
  UnitAmountMustBeGreaterThanZero = "95820"
569
553
  UnitOfMeasureIsTooLong = "95821"
554
+ UnitTaxAmountCannotBeNegative = "95826"
570
555
  UnitTaxAmountFormatIsInvalid = "95824"
571
556
  UnitTaxAmountIsTooLarge = "95825"
572
- UnitTaxAmountMustBeGreaterThanZero = "95826" # Deprecated as the amount may be zero. Use UnitTaxAmountCannotBeNegative.
573
- UnitTaxAmountCannotBeNegative = "95826"
574
- TaxAmountFormatIsInvalid = "95827"
575
- TaxAmountIsTooLarge = "95828"
576
- TaxAmountCannotBeNegative = "95829"
577
557
  end
578
558
 
579
559
  module Merchant
@@ -587,96 +567,96 @@ module Braintree
587
567
  CountryNameIsInvalid = "93611"
588
568
  CountryNameIsNotAccepted = "93610"
589
569
  CurrenciesAreInvalid = "93614"
570
+ CurrencyIsInvalid = "93618"
571
+ CurrencyIsRequired = "93617"
590
572
  EmailFormatIsInvalid = "93602"
591
573
  EmailIsRequired = "83601"
592
574
  InconsistentCountry = "93612"
593
- PaymentMethodsAreInvalid = "93613"
594
- PaymentMethodsAreNotAllowed = "93615"
595
575
  MerchantAccountExistsForCurrency = "93616"
596
- CurrencyIsRequired = "93617"
597
- CurrencyIsInvalid = "93618"
598
- NoMerchantAccounts = "93619"
599
576
  MerchantAccountExistsForId = "93620"
600
577
  MerchantAccountNotAuthOnboarded = "93621"
578
+ NoMerchantAccounts = "93619"
579
+ PaymentMethodsAreInvalid = "93613"
580
+ PaymentMethodsAreNotAllowed = "93615"
601
581
  end
602
582
 
603
583
  module MerchantAccount
604
- IdIsTooLong = "82602"
584
+ CannotBeUpdated = "82674"
585
+ Declined = "82626"
586
+ DeclinedFailedKYC = "82623"
587
+ DeclinedMasterCardMatch = "82622"
588
+ DeclinedOFAC = "82621"
589
+ DeclinedSsnInvalid = "82624"
590
+ DeclinedSsnMatchesDeceased = "82625"
591
+ IdCannotBeUpdated = "82675"
605
592
  IdFormatIsInvalid = "82603"
606
593
  IdIsInUse = "82604"
607
594
  IdIsNotAllowed = "82605"
608
- MasterMerchantAccountIdIsRequired = "82606"
595
+ IdIsTooLong = "82602"
596
+ MasterMerchantAccountIdCannotBeUpdated = "82676"
609
597
  MasterMerchantAccountIdIsInvalid = "82607"
598
+ MasterMerchantAccountIdIsRequired = "82606"
610
599
  MasterMerchantAccountMustBeActive = "82608"
611
600
  TosAcceptedIsRequired = "82610"
612
- IdCannotBeUpdated = "82675"
613
- MasterMerchantAccountIdCannotBeUpdated = "82676"
614
- CannotBeUpdated = "82674"
615
- DeclinedOFAC = "82621"
616
- DeclinedMasterCardMatch = "82622"
617
- DeclinedFailedKYC = "82623"
618
- DeclinedSsnInvalid = "82624"
619
- DeclinedSsnMatchesDeceased = "82625"
620
- Declined = "82626"
621
601
 
622
602
  module ApplicantDetails
623
- FirstNameIsRequired = "82609"
624
- LastNameIsRequired = "82611"
625
- DateOfBirthIsRequired = "82612"
626
- RoutingNumberIsRequired = "82613"
603
+ AccountNumberIsInvalid = "82670"
627
604
  AccountNumberIsRequired = "82614"
628
- SsnIsInvalid = "82615"
629
- EmailAddressIsInvalid = "82616"
630
- FirstNameIsInvalid = "82627"
631
- LastNameIsInvalid = "82628"
632
605
  CompanyNameIsInvalid = "82631"
633
- TaxIdIsInvalid = "82632"
634
606
  CompanyNameIsRequiredWithTaxId = "82633"
635
- TaxIdIsRequiredWithCompanyName = "82634"
636
- RoutingNumberIsInvalid = "82635"
637
- DeclinedOFAC = "82621" # Keep for backwards compatibility
638
- DeclinedMasterCardMatch = "82622" # Keep for backwards compatibility
607
+ DateOfBirthIsInvalid = "82663"
608
+ DateOfBirthIsRequired = "82612"
609
+ Declined = "82626" # Keep for backwards compatibility
639
610
  DeclinedFailedKYC = "82623" # Keep for backwards compatibility
611
+ DeclinedMasterCardMatch = "82622" # Keep for backwards compatibility
612
+ DeclinedOFAC = "82621" # Keep for backwards compatibility
640
613
  DeclinedSsnInvalid = "82624" # Keep for backwards compatibility
641
614
  DeclinedSsnMatchesDeceased = "82625" # Keep for backwards compatibility
642
- Declined = "82626" # Keep for backwards compatibility
643
- PhoneIsInvalid = "82636"
644
- DateOfBirthIsInvalid = "82663"
645
- AccountNumberIsInvalid = "82670"
615
+ EmailAddressIsInvalid = "82616"
646
616
  EmailAddressIsRequired = "82665"
617
+ FirstNameIsInvalid = "82627"
618
+ FirstNameIsRequired = "82609"
619
+ LastNameIsInvalid = "82628"
620
+ LastNameIsRequired = "82611"
621
+ PhoneIsInvalid = "82636"
622
+ RoutingNumberIsInvalid = "82635"
623
+ RoutingNumberIsRequired = "82613"
624
+ SsnIsInvalid = "82615"
625
+ TaxIdIsInvalid = "82632"
626
+ TaxIdIsRequiredWithCompanyName = "82634"
647
627
  TaxIdMustBeBlank = "82673"
648
628
 
649
629
  module Address
650
- StreetAddressIsRequired = "82617"
651
630
  LocalityIsRequired = "82618"
631
+ PostalCodeIsInvalid = "82630"
652
632
  PostalCodeIsRequired = "82619"
633
+ RegionIsInvalid = "82664"
653
634
  RegionIsRequired = "82620"
654
635
  StreetAddressIsInvalid = "82629"
655
- PostalCodeIsInvalid = "82630"
656
- RegionIsInvalid = "82664"
636
+ StreetAddressIsRequired = "82617"
657
637
  end
658
638
  end
659
639
 
660
640
  module Individual
661
- FirstNameIsRequired = "82637"
662
- LastNameIsRequired = "82638"
641
+ DateOfBirthIsInvalid = "82666"
663
642
  DateOfBirthIsRequired = "82639"
664
- SsnIsInvalid = "82642"
665
643
  EmailIsInvalid = "82643"
644
+ EmailIsRequired = "82667"
666
645
  FirstNameIsInvalid = "82644"
646
+ FirstNameIsRequired = "82637"
667
647
  LastNameIsInvalid = "82645"
648
+ LastNameIsRequired = "82638"
668
649
  PhoneIsInvalid = "82656"
669
- DateOfBirthIsInvalid = "82666"
670
- EmailIsRequired = "82667"
650
+ SsnIsInvalid = "82642"
671
651
 
672
652
  module Address
673
- StreetAddressIsRequired = "82657"
674
653
  LocalityIsRequired = "82658"
654
+ PostalCodeIsInvalid = "82662"
675
655
  PostalCodeIsRequired = "82659"
656
+ RegionIsInvalid = "82668"
676
657
  RegionIsRequired = "82660"
677
658
  StreetAddressIsInvalid = "82661"
678
- PostalCodeIsInvalid = "82662"
679
- RegionIsInvalid = "82668"
659
+ StreetAddressIsRequired = "82657"
680
660
  end
681
661
  end
682
662
 
@@ -688,9 +668,9 @@ module Braintree
688
668
  TaxIdIsRequiredWithLegalName = "82648"
689
669
  TaxIdMustBeBlank = "82672"
690
670
  module Address
691
- StreetAddressIsInvalid = "82685"
692
671
  PostalCodeIsInvalid = "82686"
693
672
  RegionIsInvalid = "82684"
673
+ StreetAddressIsInvalid = "82685"
694
674
  end
695
675
  end
696
676
 
@@ -709,32 +689,32 @@ module Braintree
709
689
  end
710
690
 
711
691
  module SettlementBatchSummary
712
- SettlementDateIsRequired = "82301"
713
- SettlementDateIsInvalid = "82302"
714
692
  CustomFieldIsInvalid = "82303"
693
+ SettlementDateIsInvalid = "82302"
694
+ SettlementDateIsRequired = "82301"
715
695
  end
716
696
 
717
697
  module ClientToken
718
698
  CustomerDoesNotExist = "92804"
719
699
  FailOnDuplicatePaymentMethodRequiresCustomerId = "92803"
720
700
  MakeDefaultRequiresCustomerId = "92801"
701
+ MerchantAccountDoesNotExist = "92807"
721
702
  ProxyMerchantDoesNotExist = "92805"
722
- VerifyCardRequiresCustomerId = "92802"
723
703
  UnsupportedVersion = "92806"
724
- MerchantAccountDoesNotExist = "92807"
704
+ VerifyCardRequiresCustomerId = "92802"
725
705
  end
726
706
 
727
707
  module PaymentMethod
728
- PaymentMethodNonceConsumed = "93106"
708
+ CannotForwardPaymentMethodType = "93107"
729
709
  CustomerIdIsInvalid = "93105"
730
710
  CustomerIdIsRequired = "93104"
731
711
  NonceIsInvalid = "93102"
732
712
  NonceIsRequired = "93103"
733
- PaymentMethodParamsAreRequired = "93101"
734
- PaymentMethodNonceUnknown = "93108"
735
- PaymentMethodNonceLocked = "93109"
736
- CannotForwardPaymentMethodType = "93107"
737
713
  PaymentMethodNoLongerSupported = "93117"
714
+ PaymentMethodNonceConsumed = "93106"
715
+ PaymentMethodNonceLocked = "93109"
716
+ PaymentMethodNonceUnknown = "93108"
717
+ PaymentMethodParamsAreRequired = "93101"
738
718
 
739
719
  module Options
740
720
  UsBankAccountVerificationMethodIsInvalid = "93121"
@@ -761,51 +741,52 @@ module Braintree
761
741
 
762
742
  module Verification
763
743
  module Options
744
+ AccountTypeIsInvalid = "942184"
745
+ AccountTypeNotSupported = "942185"
764
746
  AmountCannotBeNegative = "94201"
765
747
  AmountFormatIsInvalid = "94202"
766
748
  AmountIsTooLarge = "94207"
767
749
  AmountNotSupportedByProcessor = "94203"
750
+ MerchantAccountCannotBeSubMerchantAccount = "94208"
768
751
  MerchantAccountIdIsInvalid = "94204"
769
- MerchantAccountIsSuspended = "94205"
770
752
  MerchantAccountIsForbidden = "94206"
771
- MerchantAccountCannotBeSubMerchantAccount = "94208"
772
- AccountTypeIsInvalid = "942184"
773
- AccountTypeNotSupported = "942185"
753
+ MerchantAccountIsSuspended = "94205"
774
754
  end
775
755
 
776
- ThreeDSecureAuthenticationIdIsInvalid = "942196"
756
+ AmountDoesNotMatch3DSecureAmount = "94285"
757
+ MerchantAccountDoesNotSupport3DSecure = "942169"
758
+ MerchantAcountDoesNotMatch3DSecureMerchantAccount = "94284"
759
+ ThreeDSecureAuthenticationFailed = "94271"
777
760
  ThreeDSecureAuthenticationIdDoesntMatchNonceThreeDSecureAuthentication = "942198"
778
- ThreeDSecureTransactionPaymentMethodDoesntMatchThreeDSecureAuthenticationPaymentMethod = "942197"
761
+ ThreeDSecureAuthenticationIdIsInvalid = "942196"
779
762
  ThreeDSecureAuthenticationIdWithThreeDSecurePassThruIsInvalid = "942199"
780
- ThreeDSecureAuthenticationFailed = "94271"
781
763
  ThreeDSecureTokenIsInvalid = "94268"
764
+ ThreeDSecureTransactionPaymentMethodDoesntMatchThreeDSecureAuthenticationPaymentMethod = "942197"
782
765
  ThreeDSecureVerificationDataDoesntMatchVerify = "94270"
783
- MerchantAccountDoesNotSupport3DSecure = "942169"
784
- MerchantAcountDoesNotMatch3DSecureMerchantAccount = "94284"
785
- AmountDoesNotMatch3DSecureAmount = "94285"
786
766
 
787
767
  module ThreeDSecurePassThru
788
- EciFlagIsRequired = "942113"
789
- EciFlagIsInvalid = "942114"
790
- CavvIsRequired = "942116"
791
- ThreeDSecureVersionIsRequired = "942117"
792
- ThreeDSecureVersionIsInvalid = "942119"
793
768
  AuthenticationResponseIsInvalid = "942120"
794
- DirectoryResponseIsInvalid = "942121"
795
769
  CavvAlgorithmIsInvalid = "942122"
770
+ CavvIsRequired = "942116"
771
+ DirectoryResponseIsInvalid = "942121"
772
+ EciFlagIsInvalid = "942114"
773
+ EciFlagIsRequired = "942113"
774
+ ThreeDSecureVersionIsInvalid = "942119"
775
+ ThreeDSecureVersionIsRequired = "942117"
796
776
  end
797
777
  end
798
778
 
799
779
  module UsBankAccountVerification
800
- NotConfirmable = "96101"
801
- MustBeMicroTransfersVerification = "96102"
802
780
  AmountsDoNotMatch = "96103"
781
+ InvalidDepositAmounts = "96106"
782
+ MustBeMicroTransfersVerification = "96102"
783
+ NotConfirmable = "96101"
803
784
  TooManyConfirmationAttempts = "96104"
804
785
  UnableToConfirmDepositAmounts = "96105"
805
- InvalidDepositAmounts = "96106"
806
786
  end
807
787
 
808
788
  module RiskData
789
+ # NEXT_MAJOR_VERSION Remove CustomerBrowserIsTooLong (this validation is no longer applied)
809
790
  CustomerBrowserIsTooLong = "94701"
810
791
  CustomerDeviceIdIsTooLong = "94702"
811
792
  CustomerLocationZipInvalidCharacters = "94703"