spree_braintree_vzero 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +15 -0
  3. data/.gitignore +19 -0
  4. data/.rspec +1 -0
  5. data/.travis.yml +63 -0
  6. data/Appraisals +45 -0
  7. data/CONTRIBUTING.md +28 -0
  8. data/Gemfile +14 -0
  9. data/LICENSE +26 -0
  10. data/README.md +83 -0
  11. data/Rakefile +21 -0
  12. data/app/assets/images/credit_cards/icons/jcb.png +0 -0
  13. data/app/assets/javascripts/spree/backend/payments.js +19 -0
  14. data/app/assets/javascripts/spree/backend/spree_braintree_vzero.js +81 -0
  15. data/app/assets/javascripts/spree/frontend/spree_braintree_vzero.js +68 -0
  16. data/app/assets/stylesheets/spree/backend/spree_braintree_vzero.css +5 -0
  17. data/app/controllers/spree/admin/payments_controller_decorator.rb +43 -0
  18. data/app/controllers/spree/api/v1/braintree_client_token_controller.rb +31 -0
  19. data/app/controllers/spree/checkout_controller_decorator.rb +38 -0
  20. data/app/controllers/spree/orders_controller_decorator.rb +62 -0
  21. data/app/controllers/spree/user_sessions_controller_decorator.rb +15 -0
  22. data/app/helpers/spree/admin/decorated_navigation_helper.rb +10 -0
  23. data/app/helpers/spree/admin/payment_methods_helper.rb +101 -0
  24. data/app/helpers/spree/braintree_helper.rb +27 -0
  25. data/app/models/braintree/successful_result_decorator.rb +21 -0
  26. data/app/models/spree/address_decorator.rb +18 -0
  27. data/app/models/spree/braintree_checkout.rb +105 -0
  28. data/app/models/spree/gateway/braintree_vzero_base.rb +168 -0
  29. data/app/models/spree/gateway/braintree_vzero_base/address.rb +33 -0
  30. data/app/models/spree/gateway/braintree_vzero_base/braintree_user.rb +25 -0
  31. data/app/models/spree/gateway/braintree_vzero_base/purchase_data.rb +48 -0
  32. data/app/models/spree/gateway/braintree_vzero_base/transaction.rb +39 -0
  33. data/app/models/spree/gateway/braintree_vzero_base/utils.rb +108 -0
  34. data/app/models/spree/gateway/braintree_vzero_drop_in_ui.rb +24 -0
  35. data/app/models/spree/gateway/braintree_vzero_hosted_fields.rb +28 -0
  36. data/app/models/spree/gateway/braintree_vzero_paypal_express.rb +36 -0
  37. data/app/models/spree/order_decorator.rb +153 -0
  38. data/app/models/spree/payment_decorator.rb +10 -0
  39. data/app/models/spree/payment_processing_decorator.rb +61 -0
  40. data/app/models/spree/preferences/preferable_decorator.rb +54 -0
  41. data/app/overrides/spree/admin/orders/customer_details/_form.rb +8 -0
  42. data/app/overrides/spree/admin/payment_methods/_form.rb +10 -0
  43. data/app/overrides/spree/admin/shared/_order_summary.rb +23 -0
  44. data/app/overrides/spree/admin/shared/_refunds.rb +13 -0
  45. data/app/overrides/spree/checkout/_new_user.rb +6 -0
  46. data/app/overrides/spree/checkout/_payment.rb +20 -0
  47. data/app/overrides/spree/checkout/registration.rb +6 -0
  48. data/app/overrides/spree/orders/edit.rb +6 -0
  49. data/app/overrides/spree/shared/_order_details.rb +13 -0
  50. data/app/overrides/spree/shared/_payment.rb +28 -0
  51. data/app/views/spree/admin/payment_methods/_braintree_vzero_form.html.erb +83 -0
  52. data/app/views/spree/admin/payments/source_forms/_braintree_vzero_dropin_ui.html.erb +1 -0
  53. data/app/views/spree/admin/payments/source_forms/_braintree_vzero_hosted_fields.html.erb +1 -0
  54. data/app/views/spree/admin/payments/source_forms/_braintree_vzero_paypal_express.html.erb +1 -0
  55. data/app/views/spree/admin/payments/source_forms/braintree_vzero/_payments.html.erb +87 -0
  56. data/app/views/spree/admin/payments/source_views/_braintree_vzero_dropin_ui.html.erb +1 -0
  57. data/app/views/spree/admin/payments/source_views/_braintree_vzero_hosted_fields.html.erb +1 -0
  58. data/app/views/spree/admin/payments/source_views/_braintree_vzero_paypal_express.html.erb +1 -0
  59. data/app/views/spree/admin/payments/source_views/braintree_vzero/_payment.html.erb +17 -0
  60. data/app/views/spree/braintree_vzero/_paypal_checkout.html.erb +87 -0
  61. data/app/views/spree/checkout/payment/_braintree_vzero_dropin_ui.html.erb +4 -0
  62. data/app/views/spree/checkout/payment/_braintree_vzero_hosted_fields.html.erb +4 -0
  63. data/app/views/spree/checkout/payment/_braintree_vzero_paypal_express.html.erb +4 -0
  64. data/app/views/spree/checkout/payment/braintree_vzero/_buttons.html.erb +11 -0
  65. data/app/views/spree/checkout/payment/braintree_vzero/_dropin_on_error_callback.js.erb +3 -0
  66. data/app/views/spree/checkout/payment/braintree_vzero/_dropin_on_ready_callback.js.erb +1 -0
  67. data/app/views/spree/checkout/payment/braintree_vzero/_hosted_fields_on_field_event_callback.js.erb +12 -0
  68. data/app/views/spree/checkout/payment/braintree_vzero/_hosted_fields_styles.js.erb +29 -0
  69. data/app/views/spree/checkout/payment/braintree_vzero/_payment.html.erb +84 -0
  70. data/app/views/spree/checkout/payment/braintree_vzero/_three_d_secure.html.erb +218 -0
  71. data/app/views/spree/shared/braintree_vzero/_dropin.js.erb +70 -0
  72. data/app/views/spree/shared/braintree_vzero/_hosted.js.erb +66 -0
  73. data/app/views/spree/shared/braintree_vzero/_paypal.js.erb +39 -0
  74. data/bin/rails +7 -0
  75. data/config/initializers/extend_spree_permitted_checkout_attributes.rb +5 -0
  76. data/config/initializers/prepend_helpers.rb +1 -0
  77. data/config/locales/en.yml +79 -0
  78. data/config/routes.rb +7 -0
  79. data/db/migrate/20150904143013_create_spree_braintree_checkouts.rb +9 -0
  80. data/db/migrate/20151002094655_add_braintree_id_to_spree_addresses.rb +5 -0
  81. data/db/migrate/20151018123907_add_braintree_token_and_nonce_to_spree_payments.rb +6 -0
  82. data/db/migrate/20151027135109_add_paypal_email_to_spree_braintree_checkout.rb +5 -0
  83. data/db/migrate/20151028095515_add_advanced_fraud_data_to_spree_braintree_checkout.rb +5 -0
  84. data/db/migrate/20151202095956_add_risk_id_and_risk_decision_to_spree_braintree_checkouts.rb +6 -0
  85. data/db/migrate/20151211100203_add_braintree_last_digits_and_braintree_card_type_to_spree_braintree_checkouts.rb +6 -0
  86. data/db/migrate/20160112153422_add_admin_payment_to_spree_braintree_checkout.rb +5 -0
  87. data/gemfiles/spree_3_5.gemfile +12 -0
  88. data/gemfiles/spree_3_5_spree_auth_devise.gemfile +13 -0
  89. data/gemfiles/spree_3_7.gemfile +12 -0
  90. data/gemfiles/spree_3_7_spree_auth_devise.gemfile +13 -0
  91. data/gemfiles/spree_4_0.gemfile +11 -0
  92. data/gemfiles/spree_4_0_spree_auth_devise.gemfile +12 -0
  93. data/gemfiles/spree_master.gemfile +11 -0
  94. data/gemfiles/spree_master_spree_auth_devise.gemfile +12 -0
  95. data/lib/generators/spree_braintree_vzero/install/install_generator.rb +34 -0
  96. data/lib/spree_braintree_vzero.rb +6 -0
  97. data/lib/spree_braintree_vzero/engine.rb +28 -0
  98. data/lib/spree_braintree_vzero/factories.rb +10 -0
  99. data/lib/spree_braintree_vzero/railtie.rb +8 -0
  100. data/lib/spree_braintree_vzero/version.rb +17 -0
  101. data/lib/tasks/spree_braintree_vzero.rake +6 -0
  102. data/spec/controllers/spree/api/v1/braintree_client_token_controller_spec.rb +49 -0
  103. data/spec/controllers/spree/checkout_controller_spec.rb +85 -0
  104. data/spec/controllers/spree/orders_controller_spec.rb +97 -0
  105. data/spec/factories/braintree_checkout_factory.rb +7 -0
  106. data/spec/factories/braintree_gateway_factory.rb +35 -0
  107. data/spec/factories/payment_factory_decorator.rb +28 -0
  108. data/spec/features/spree/admin/log_entries_spec.rb +63 -0
  109. data/spec/models/gateway/braintree_vzero_base/address_spec.rb +28 -0
  110. data/spec/models/gateway/braintree_vzero_base/purchase_data_spec.rb +57 -0
  111. data/spec/models/gateway/braintree_vzero_base_spec.rb +346 -0
  112. data/spec/models/gateway/braintree_vzero_dropin_ui_spec.rb +35 -0
  113. data/spec/models/gateway/braintree_vzero_hosted_fields_spec.rb +35 -0
  114. data/spec/models/spree/order_spec.rb +186 -0
  115. data/spec/spec_helper.rb +100 -0
  116. data/spec/support/vcr.rb +10 -0
  117. data/spec/vcr/Log_entries/with_a_failed_log_entry/shows_a_failed_attempt.yml +91 -0
  118. data/spec/vcr/Log_entries/with_a_successful_log_entry/shows_a_successful_attempt.yml +113 -0
  119. data/spec/vcr/Spree_Api_V1_BraintreeClientTokenController/POST_create/guest_checkout/returns_proper_json_data_when_gateway_not_specified.yml +90 -0
  120. data/spec/vcr/Spree_Api_V1_BraintreeClientTokenController/POST_create/guest_checkout/returns_proper_json_data_when_gateway_specified.yml +90 -0
  121. data/spec/vcr/Spree_Api_V1_BraintreeClientTokenController/POST_create/user_checkout/returns_proper_json_data_when_gateway_not_specified.yml +191 -0
  122. data/spec/vcr/Spree_Api_V1_BraintreeClientTokenController/POST_create/user_checkout/returns_proper_json_data_when_gateway_specified.yml +191 -0
  123. data/spec/vcr/Spree_CheckoutController/_update/braintree_payment/advanced_fraud_data_in_source_should_be_updated.yml +71 -0
  124. data/spec/vcr/Spree_CheckoutController/_update/braintree_payment/when_token_credit_card_data_in_source_should_be_updated_from_Braintree_Vault.yml +139 -0
  125. data/spec/vcr/Spree_CheckoutController/_update/braintree_paypal_express_payment/amount_in_payment_should_be_updated.yml +280 -0
  126. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_capture/captures_authorized_amount/updates_Payment_state.yml +206 -0
  127. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_credit/with_refundable_state/should_be_a_success.yml +211 -0
  128. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_credit/with_unrefundable_state/should_not_be_a_success.yml +177 -0
  129. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/data_from_admin_panel/should_include_only_essential_data.yml +78 -0
  130. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/does_not_store_Transaction_in_Vault_by_default.yml +111 -0
  131. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/returns_false_with_invalid_nonce.yml +88 -0
  132. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/returns_false_with_invalid_token.yml +88 -0
  133. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/returns_success_with_valid_token.yml +113 -0
  134. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/returns_suceess_with_valid_nonce.yml +111 -0
  135. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/saves_Braintree_Address_id_to_Spree_Address_when_address_is_being_saved.yml +130 -0
  136. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/saves_unique_Braintree_Addresses_ids.yml +143 -0
  137. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/sends_empty_address_id_when_address_is_already_in_vault.yml +553 -0
  138. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/using_Vault/stores_Transaction.yml +181 -0
  139. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/with_3DSecure_option_turned_on/performs_3DSecure_check.yml +112 -0
  140. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/with_3DSecure_option_turned_on/returns_error.yml +112 -0
  141. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/with_advanced_fraud_tool_enabled/returns_fraud_data.yml +111 -0
  142. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_purchase/with_advanced_fraud_tool_enabled/returns_success.yml +111 -0
  143. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_settle/settles_authorized_amount/does_not_update_Order_payment_state.yml +204 -0
  144. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_settle/settles_authorized_amount/prepares_Checkout_for_status_updating.yml +204 -0
  145. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_settle/settles_authorized_amount/submits_Transaction_for_settlement.yml +377 -0
  146. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_settle/settles_authorized_amount/updates_Payment_state.yml +203 -0
  147. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_update_states/does_not_update_completed_Checkout_on_subsequent_runs.yml +202 -0
  148. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_update_states/updates_Order_payment_state_when_Checkout_is_updated.yml +202 -0
  149. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_update_states/updates_Payment_state_when_Checkout_is_updated.yml +202 -0
  150. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_update_states/updates_payment_State.yml +202 -0
  151. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_void/with_unvoidable_state/should_not_change_payment_source_state.yml +178 -0
  152. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/_void/with_voidable_state/should_change_payment_source_state_to_voided.yml +199 -0
  153. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/generates_token_for_User_registered_in_Braintree.yml +356 -0
  154. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/generates_token_for_new_User.yml +189 -0
  155. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/valid_credentials/generates_token_without_User.yml +89 -0
  156. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase/with_invalid_credentials/raises_Braintree_error.yml +62 -0
  157. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase_Address/_create/creates_Braintree_Address.yml +84 -0
  158. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase_Address/_create/deletes_Braintree_Address.yml +141 -0
  159. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase_Address/_create/finds_Braintree_Address.yml +148 -0
  160. data/spec/vcr/Spree_Gateway_BraintreeVzeroBase_Address/_create/updates_Braintree_Address.yml +154 -0
  161. data/spec/vcr/Spree_Order/complete_with_braintree_vzero_standard_payment/with_auto_capture/should_complete_payment.yml +116 -0
  162. data/spec/vcr/Spree_Order/complete_with_braintree_vzero_standard_payment/with_auto_capture/should_update_payment_s_response_code.yml +111 -0
  163. data/spec/vcr/Spree_Order/complete_with_braintree_vzero_standard_payment/with_auto_capture/should_update_payment_s_source_state_and_transaction_id.yml +111 -0
  164. data/spec/vcr/Spree_Order/complete_with_braintree_vzero_standard_payment/without_auto_capture/should_pend_payment.yml +111 -0
  165. data/spec/vcr/Spree_Order/complete_with_braintree_vzero_standard_payment/without_auto_capture/should_update_payment_s_response_code.yml +111 -0
  166. data/spec/vcr/Spree_Order/complete_with_braintree_vzero_standard_payment/without_auto_capture/should_update_payment_s_source_state_and_transaction_id.yml +110 -0
  167. data/spree_braintree_vzero.gemspec +52 -0
  168. data/vendor/assets/javascripts/maskedinput/jquery.maskedinput.min.js +7 -0
  169. metadata +643 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/yccdpmn3cvtjbgnr/client_token
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <client-token>
11
+ <version type="integer">2</version>
12
+ </client-token>
13
+ headers:
14
+ Accept-Encoding:
15
+ - gzip
16
+ Accept:
17
+ - application/xml
18
+ User-Agent:
19
+ - Braintree Ruby Gem 2.49.0
20
+ X-Apiversion:
21
+ - '4'
22
+ Content-Type:
23
+ - application/xml
24
+ response:
25
+ status:
26
+ code: 201
27
+ message: Created
28
+ headers:
29
+ Date:
30
+ - Tue, 13 Oct 2015 14:08:39 GMT
31
+ Content-Type:
32
+ - application/xml; charset=utf-8
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Connection:
36
+ - close
37
+ X-Authentication:
38
+ - basic_auth
39
+ Strict-Transport-Security:
40
+ - max-age=31536000
41
+ - max-age=31536000; includeSubDomains
42
+ X-User:
43
+ - 97syg9czj6hrdzyn
44
+ Vary:
45
+ - Accept-Encoding
46
+ Content-Encoding:
47
+ - gzip
48
+ X-Ua-Compatible:
49
+ - IE=Edge,chrome=1
50
+ Etag:
51
+ - '"7ac7551c6075bb274890d78067ae9a91"'
52
+ Cache-Control:
53
+ - max-age=0, private, must-revalidate
54
+ X-Request-Id:
55
+ - 8b93c654818a9e213af3317ecd2da87b
56
+ X-Runtime:
57
+ - '0.186370'
58
+ X-Frame-Options:
59
+ - SAMEORIGIN
60
+ body:
61
+ encoding: ASCII-8BIT
62
+ string: !binary |-
63
+ H4sIAGcQHVYAA7xVXW+jOBR9n19R9X12wCndQep01KQDAQVnQhIDfsN22gA2
64
+ ZEv48q/fS/qV0VarkVbaB5QIru+599xzrm++90petLunOqvKb5fmH8blxa7k
65
+ lcjKx2+X243z+evl99tPN1xmu/L4+VgVu/L208XFTZvKZne7G3xEY1+nkd14
66
+ eTUsZv5exGHFJv5hpxxjfB8q2VBEBj73D6xcZcvML4INLhItC6xXfRB5JvxX
67
+ OKcZ1oVebqYZzVfG8v6uTzZOHmiSBXoqA3erl/c/DIycPNGPXRCRDKNkCNRK
68
+ 04iqBxcPNHIMGoUPSbyyg/yux2ujD2bwmKse31fd8r7Sy/WVDvSjsdzcDUFe
69
+ PAX3d13g9Cb8DliZkitcJZFlxEgWP2OZJyjsWHSlkwk1UuWXrPS52MCZnHYi
70
+ 8us0wg8pIhbEFngjKpaLHM+hJ7Xvli7PgJOcIUulkSBcdWP/lZiHHddVu0BO
71
+ l64tDXhFouyrhfKHJJKNmPuSRmIvXDJJ4qJJkH1cAifBYB+B7zx1HYgJ2l0E
72
+ rM2nR5bjXJThX4kSDc/snLlSsnLkYXpYTJJ+gXDLFD3QCRmSODwwdHWqC/LU
73
+ zCXjfLSXH1i87jIaWSiNfYg35cu83urzsi5LUH+AGGMFuUns1zD3LJ2HBp8H
74
+ 14vB3nO3aDhyGur67W5mZVw5MPcQZkNKwJYCOdZCQT2bysD3QcsiqAnt9xCj
75
+ F5OP+PbaV8z4xJdXe8rRHBGDm2RgM+/aU3tDzKd6mX1tkxhrGkOuf+Hy1EdM
76
+ jNT56Dy8n1kI8I5s+L3ZnPJF1p7NJWgej1z+6ZUf5H7pYxE5TRL1lnBlzn8X
77
+ ozRqrwwrrogMHSwTmCXdEsjj1zSCOQHHItr+M2btXYNPa4bsJxFP/y8NGul4
78
+ nthFPHmtw36p4S57AJ1x17HgqUPgLVG9pMAVYJr07NuJRxUe+GRaJ7FcJpEp
79
+ R71tJ9M9V/XjFtm1OOnZ0p6Du0U2vfbcrw0bnvX94gN/zM1KUrMZ5IY9JJST
80
+ 78j5fO5G7cqd6xy528uTPtd2x2egtZKAnvwpnYx8jJ4If+FwnCuNQb/xtKZr
81
+ C7xutMK19UkToFNK/otGn+M+8BnwT/IU2aaYWR1w0yVR93aOuhL8ho3VGf5r
82
+ /6C7mk2EN9YO/Bq8JBK4gr7ogSu7AT824ofVbhQxBLKHdHifywe7oaWKwg60
83
+ 5Igr4DvUO+5g/KYRwKbKqTkCbZ73u8VwbsSSxdgbixwN/Q+vHgmG0edwZ7j9
84
+ gSlxzr8+18x77vfdvQJNssl7bn7Sy1Ez1JvguZaVWPP5oWUnDGzyEvpX2FrH
85
+ uF0huxg94xWEbDPfft7fsjnN8txvioLf8cjdux9e8D72xKglCjhme+oXUQX6
86
+ bOjat2++PN+nn26+/HrT/g0AAP//AwC3PweLoAcAAA==
87
+ http_version:
88
+ recorded_at: Tue, 13 Oct 2015 14:08:39 GMT
89
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,62 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/invalid_id/client_token
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <client-token>
11
+ <version type="integer">2</version>
12
+ </client-token>
13
+ headers:
14
+ Accept-Encoding:
15
+ - gzip
16
+ Accept:
17
+ - application/xml
18
+ User-Agent:
19
+ - Braintree Ruby Gem 2.49.0
20
+ X-Apiversion:
21
+ - '4'
22
+ Content-Type:
23
+ - application/xml
24
+ response:
25
+ status:
26
+ code: 401
27
+ message: Unauthorized
28
+ headers:
29
+ Date:
30
+ - Tue, 20 Oct 2015 08:07:02 GMT
31
+ Content-Type:
32
+ - application/xml; charset=utf-8
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Connection:
36
+ - close
37
+ Www-Authenticate:
38
+ - Basic realm="Braintree API"
39
+ Vary:
40
+ - Accept-Encoding
41
+ Content-Encoding:
42
+ - gzip
43
+ X-Ua-Compatible:
44
+ - IE=Edge,chrome=1
45
+ Cache-Control:
46
+ - no-cache
47
+ X-Request-Id:
48
+ - 2f041ceb08fbf443f4fa54617b30d37e
49
+ X-Runtime:
50
+ - '0.025160'
51
+ X-Frame-Options:
52
+ - SAMEORIGIN
53
+ Strict-Transport-Security:
54
+ - max-age=31536000; includeSubDomains
55
+ body:
56
+ encoding: ASCII-8BIT
57
+ string: !binary |-
58
+ H4sIACb2JVYAA/IICQlQcEoszky2UnBMTk4tLlZISc3LTE3R4wIAAAD//wMA
59
+ aO1LWhsAAAA=
60
+ http_version:
61
+ recorded_at: Tue, 20 Oct 2015 08:07:02 GMT
62
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,84 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/yccdpmn3cvtjbgnr/customers/1/addresses
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <address>
11
+ <company>Company</company>
12
+ <country-code-alpha2>US</country-code-alpha2>
13
+ <country-code-alpha3>USA</country-code-alpha3>
14
+ <country-code-numeric type="integer">840</country-code-numeric>
15
+ <country-name>United States of America</country-name>
16
+ <first-name>John</first-name>
17
+ <last-name>Doe</last-name>
18
+ <locality>Herndon</locality>
19
+ <postal-code>35005</postal-code>
20
+ <region>AL</region>
21
+ <street-address>10 Lovely Street</street-address>
22
+ <extended-address>Northwest</extended-address>
23
+ </address>
24
+ headers:
25
+ Accept-Encoding:
26
+ - gzip
27
+ Accept:
28
+ - application/xml
29
+ User-Agent:
30
+ - Braintree Ruby Gem 2.49.0
31
+ X-Apiversion:
32
+ - '4'
33
+ Content-Type:
34
+ - application/xml
35
+ response:
36
+ status:
37
+ code: 201
38
+ message: Created
39
+ headers:
40
+ Date:
41
+ - Tue, 13 Oct 2015 14:08:26 GMT
42
+ Content-Type:
43
+ - application/xml; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - close
48
+ X-Authentication:
49
+ - basic_auth
50
+ Strict-Transport-Security:
51
+ - max-age=31536000
52
+ - max-age=31536000; includeSubDomains
53
+ X-User:
54
+ - 97syg9czj6hrdzyn
55
+ Vary:
56
+ - Accept-Encoding
57
+ Content-Encoding:
58
+ - gzip
59
+ X-Ua-Compatible:
60
+ - IE=Edge,chrome=1
61
+ Etag:
62
+ - '"4cb568511aaf858e5f6cf2f9805eb0ef"'
63
+ Cache-Control:
64
+ - max-age=0, private, must-revalidate
65
+ X-Request-Id:
66
+ - 77fab1dfb1c45459ec5dbeaecfd358ed
67
+ X-Runtime:
68
+ - '0.138505'
69
+ X-Frame-Options:
70
+ - SAMEORIGIN
71
+ body:
72
+ encoding: ASCII-8BIT
73
+ string: !binary |-
74
+ H4sIAFoQHVYAA5RST2/CIBS/+ylI7wxqdTEGMWbLsixmF/WyGylPJWmhAers
75
+ tx9UbRv1shP8/r083oMtz2WBTmCdMnqRpC80QaBzI5U+LJLd9gPPkiUfMSGl
76
+ Bef4CCGmJPcnRsIRUV47b0qwOOCUkSGM8l5Z57EWJfAvc9SMDIioF+KG3g0w
77
+ 0sO2tikroRv+djlD9SsRRectgMe3zlKK1uYERYM2rcDInSFm4OxBS5Ad+W2s
78
+ P/6CC/YHrW3P5KJQvuGfYLU0of+OibKFQ5gbX60ZuV4jWxnnRYHDFIFnU0qn
79
+ jAypy8tq7W3TElgU1VGM+W4TH/jIP/dnwb96FsgeA7oOG1E5n03oXeKmDCPt
80
+ +HdaeZBhlsKDQ2aPVq1R9Pl+SxaCKczNI99UsEhkgF6VkPAxTac4pTjNtulk
81
+ Tmfz8etPqNAF2nxdyf/l+0D4maRb1x8AAAD//wMABzV1nswCAAA=
82
+ http_version:
83
+ recorded_at: Tue, 13 Oct 2015 14:08:26 GMT
84
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,141 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/yccdpmn3cvtjbgnr/customers/1/addresses
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <address>
11
+ <company>Company</company>
12
+ <country-code-alpha2>US</country-code-alpha2>
13
+ <country-code-alpha3>USA</country-code-alpha3>
14
+ <country-code-numeric type="integer">840</country-code-numeric>
15
+ <country-name>United States of America</country-name>
16
+ <first-name>John</first-name>
17
+ <last-name>Doe</last-name>
18
+ <locality>Herndon</locality>
19
+ <postal-code>35005</postal-code>
20
+ <region>AL</region>
21
+ <street-address>10 Lovely Street</street-address>
22
+ <extended-address>Northwest</extended-address>
23
+ </address>
24
+ headers:
25
+ Accept-Encoding:
26
+ - gzip
27
+ Accept:
28
+ - application/xml
29
+ User-Agent:
30
+ - Braintree Ruby Gem 2.49.0
31
+ X-Apiversion:
32
+ - '4'
33
+ Content-Type:
34
+ - application/xml
35
+ response:
36
+ status:
37
+ code: 201
38
+ message: Created
39
+ headers:
40
+ Date:
41
+ - Tue, 13 Oct 2015 14:08:30 GMT
42
+ Content-Type:
43
+ - application/xml; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - close
48
+ X-Authentication:
49
+ - basic_auth
50
+ Strict-Transport-Security:
51
+ - max-age=31536000
52
+ - max-age=31536000; includeSubDomains
53
+ X-User:
54
+ - 97syg9czj6hrdzyn
55
+ Vary:
56
+ - Accept-Encoding
57
+ Content-Encoding:
58
+ - gzip
59
+ X-Ua-Compatible:
60
+ - IE=Edge,chrome=1
61
+ Etag:
62
+ - '"221759f0f289cef157888534dc4bb075"'
63
+ Cache-Control:
64
+ - max-age=0, private, must-revalidate
65
+ X-Request-Id:
66
+ - 48070c66fb044a35195dd84cc66b6f45
67
+ X-Runtime:
68
+ - '0.081315'
69
+ X-Frame-Options:
70
+ - SAMEORIGIN
71
+ body:
72
+ encoding: ASCII-8BIT
73
+ string: !binary |-
74
+ H4sIAF4QHVYAA5RST2/CIBS/+ylI7wxqNTEGMWbLsixmF/WyGylPJWuhAers
75
+ tx9UbRv1shP8/r083oMtz2WBTmCdMnqRpC80QaBzI5U+LJLd9h3PkiUfMSGl
76
+ Bef4CCGmJP+ZMBKOiPLaeVOCxQGnjAxhlPfKOo+1KIF/mqNmZEBEvRA39GaA
77
+ kR62tU1ZCd3w18sZql+JKDpvATy+dZZStDYnKBq0aQVG7gwxA2cPWoLsyC9j
78
+ /fEXXLA/aG17JheF8g3/AKulCf13TJQtHMLc+GrNyPUa2co4Lwocpgg8m1I6
79
+ ZWRIXV5Wa2+blsCiqI5izHeb+MBH/rk/C/7Vs0D2GNB12IjK+WxC7xI3ZRhp
80
+ x7/TyoMMsxQeHDJ7tGqNos/3W7IQTGFuHvmmgkUiA/SqhISPaTrFKcVptk0n
81
+ czqbZ/Q7VOgCbb6u5P/yfSD8TNKt6w8AAP//AwAKXtY0zAIAAA==
82
+ http_version:
83
+ recorded_at: Tue, 13 Oct 2015 14:08:30 GMT
84
+ - request:
85
+ method: delete
86
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/yccdpmn3cvtjbgnr/customers/1/addresses/k4
87
+ body:
88
+ encoding: US-ASCII
89
+ string: ''
90
+ headers:
91
+ Accept-Encoding:
92
+ - gzip
93
+ Accept:
94
+ - application/xml
95
+ User-Agent:
96
+ - Braintree Ruby Gem 2.49.0
97
+ X-Apiversion:
98
+ - '4'
99
+ response:
100
+ status:
101
+ code: 200
102
+ message: OK
103
+ headers:
104
+ Date:
105
+ - Tue, 13 Oct 2015 14:08:31 GMT
106
+ Content-Type:
107
+ - application/xml; charset=utf-8
108
+ Transfer-Encoding:
109
+ - chunked
110
+ Connection:
111
+ - close
112
+ X-Authentication:
113
+ - basic_auth
114
+ Strict-Transport-Security:
115
+ - max-age=31536000
116
+ - max-age=31536000; includeSubDomains
117
+ X-User:
118
+ - 97syg9czj6hrdzyn
119
+ Vary:
120
+ - Accept-Encoding
121
+ Content-Encoding:
122
+ - gzip
123
+ X-Ua-Compatible:
124
+ - IE=Edge,chrome=1
125
+ Etag:
126
+ - '"e34deedbb3d493130e8a67f79b31808a"'
127
+ Cache-Control:
128
+ - max-age=0, private, must-revalidate
129
+ X-Request-Id:
130
+ - b352930faacd81f3fc9855aa034e362c
131
+ X-Runtime:
132
+ - '0.059687'
133
+ X-Frame-Options:
134
+ - SAMEORIGIN
135
+ body:
136
+ encoding: ASCII-8BIT
137
+ string: !binary |-
138
+ H4sIAF8QHVYAA1IAAAAA//8DAEXPbOkBAAAA
139
+ http_version:
140
+ recorded_at: Tue, 13 Oct 2015 14:08:31 GMT
141
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,148 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/yccdpmn3cvtjbgnr/customers/1/addresses
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0" encoding="UTF-8"?>
10
+ <address>
11
+ <company>Company</company>
12
+ <country-code-alpha2>US</country-code-alpha2>
13
+ <country-code-alpha3>USA</country-code-alpha3>
14
+ <country-code-numeric type="integer">840</country-code-numeric>
15
+ <country-name>United States of America</country-name>
16
+ <first-name>John</first-name>
17
+ <last-name>Doe</last-name>
18
+ <locality>Herndon</locality>
19
+ <postal-code>35005</postal-code>
20
+ <region>AL</region>
21
+ <street-address>10 Lovely Street</street-address>
22
+ <extended-address>Northwest</extended-address>
23
+ </address>
24
+ headers:
25
+ Accept-Encoding:
26
+ - gzip
27
+ Accept:
28
+ - application/xml
29
+ User-Agent:
30
+ - Braintree Ruby Gem 2.49.0
31
+ X-Apiversion:
32
+ - '4'
33
+ Content-Type:
34
+ - application/xml
35
+ response:
36
+ status:
37
+ code: 201
38
+ message: Created
39
+ headers:
40
+ Date:
41
+ - Tue, 13 Oct 2015 14:08:28 GMT
42
+ Content-Type:
43
+ - application/xml; charset=utf-8
44
+ Transfer-Encoding:
45
+ - chunked
46
+ Connection:
47
+ - close
48
+ X-Authentication:
49
+ - basic_auth
50
+ Strict-Transport-Security:
51
+ - max-age=31536000
52
+ - max-age=31536000; includeSubDomains
53
+ X-User:
54
+ - 97syg9czj6hrdzyn
55
+ Vary:
56
+ - Accept-Encoding
57
+ Content-Encoding:
58
+ - gzip
59
+ X-Ua-Compatible:
60
+ - IE=Edge,chrome=1
61
+ Etag:
62
+ - '"be8101c39d7fdf5c2b3752efbe967ba9"'
63
+ Cache-Control:
64
+ - max-age=0, private, must-revalidate
65
+ X-Request-Id:
66
+ - 2a437be73a0d587cf2656398fe4d8f1e
67
+ X-Runtime:
68
+ - '0.108872'
69
+ X-Frame-Options:
70
+ - SAMEORIGIN
71
+ body:
72
+ encoding: ASCII-8BIT
73
+ string: !binary |-
74
+ H4sIAFwQHVYAA5RST2/CIBS/+ylI7wxqdWkMYsyWZVnMLuplN1KeStJCA9TZ
75
+ bz+o2hr1shP8/r083oMtTlWJjmCdMnqepC80QaALI5Xez5Pt5gPnyYKPmJDS
76
+ gnN8hBBTkr/uGAlHREXjvKnA4oBTRm5hlHfKOo+1qIB/mYNm5IaIeimu6N0A
77
+ IwPsapuqFrrlb+czVL8QUXTeAnh87SylaGWOULZo3QmM3BliBk4etATZk9/G
78
+ +sMvuGB/0Lr2TCFK5Vv+CVZLE/rvmShb2Ie58eWKkcs1srVxXpQ4TBF4NqV0
79
+ ysgtdX5Zo71tOwKLsj6IMd+u4wMf+ef+LPiXzwLZY0A3YSOq4PmE3iWuym2k
80
+ G/9WKw8yzFJ4cMjs0LIziiE/bMlCMIW5eeTbGuaJDNCrChI+pukUpxSn2Sad
81
+ zGg+G+c/oUIf6PJNLf+XHwLhZ5J+XX8AAAD//wMAtAlsnswCAAA=
82
+ http_version:
83
+ recorded_at: Tue, 13 Oct 2015 14:08:28 GMT
84
+ - request:
85
+ method: get
86
+ uri: https://yd57hn7c4r5bhp8g:1cc8b0097ef43165847630438f864834@api.sandbox.braintreegateway.com/merchants/yccdpmn3cvtjbgnr/customers/1/addresses/6f
87
+ body:
88
+ encoding: US-ASCII
89
+ string: ''
90
+ headers:
91
+ Accept-Encoding:
92
+ - gzip
93
+ Accept:
94
+ - application/xml
95
+ User-Agent:
96
+ - Braintree Ruby Gem 2.49.0
97
+ X-Apiversion:
98
+ - '4'
99
+ response:
100
+ status:
101
+ code: 200
102
+ message: OK
103
+ headers:
104
+ Date:
105
+ - Tue, 13 Oct 2015 14:08:29 GMT
106
+ Content-Type:
107
+ - application/xml; charset=utf-8
108
+ Transfer-Encoding:
109
+ - chunked
110
+ Connection:
111
+ - close
112
+ X-Authentication:
113
+ - basic_auth
114
+ Strict-Transport-Security:
115
+ - max-age=31536000
116
+ - max-age=31536000; includeSubDomains
117
+ X-User:
118
+ - 97syg9czj6hrdzyn
119
+ Vary:
120
+ - Accept-Encoding
121
+ Content-Encoding:
122
+ - gzip
123
+ X-Ua-Compatible:
124
+ - IE=Edge,chrome=1
125
+ Etag:
126
+ - '"4d83efa809bafd76cda907e5890272a1"'
127
+ Cache-Control:
128
+ - max-age=0, private, must-revalidate
129
+ X-Request-Id:
130
+ - e3f08d087681dd3b0b4d116a88218dce
131
+ X-Runtime:
132
+ - '0.097743'
133
+ X-Frame-Options:
134
+ - SAMEORIGIN
135
+ body:
136
+ encoding: ASCII-8BIT
137
+ string: !binary |-
138
+ H4sIAF0QHVYAA5RST2/CIBS/+ylI7wxqdWkMYsyWZVnMLuplN1KeStJCA9TZ
139
+ bz+o2hr1shP8/r083oMtTlWJjmCdMnqepC80QaALI5Xez5Pt5gPnyYKPmJDS
140
+ gnN8hBBTkr/uGAlHREXjvKnA4oBTRm5hlHfKOo+1qIB/mYNm5IaIeimu6N0A
141
+ IwPsapuqFrrlb+czVL8QUXTeAnh87SylaGWOULZo3QmM3BliBk4etATZk9/G
142
+ +sMvuGB/0Lr2TCFK5Vv+CVZLE/rvmShb2Ie58eWKkcs1srVxXpQ4TBF4NqV0
143
+ ysgtdX5Zo71tOwKLsj6IMd+u4wMf+ef+LPiXzwLZY0A3YSOq4PmE3iWuym2k
144
+ G/9WKw8yzFJ4cMjs0LIziiE/bMlCMIW5eeTbGuaJDNCrChI+pukUpxSn2Sad
145
+ zGg+G+c/oUIf6PJNLf+XHwLhZ5J+XX8AAAD//wMAtAlsnswCAAA=
146
+ http_version:
147
+ recorded_at: Tue, 13 Oct 2015 14:08:29 GMT
148
+ recorded_with: VCR 2.9.3