jackpot 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/.gitignore +16 -0
  2. data/.rspec +1 -0
  3. data/.rvmrc.example +1 -0
  4. data/.travis.yml +12 -0
  5. data/Gemfile +9 -0
  6. data/Gemfile.lock +181 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +134 -0
  9. data/Rakefile +25 -0
  10. data/app/assets/images/jackpot/.gitkeep +0 -0
  11. data/app/assets/javascripts/jackpot/application.js +5 -0
  12. data/app/assets/javascripts/jackpot/bootstrap.js +32 -0
  13. data/app/assets/javascripts/jackpot/customers.js +2 -0
  14. data/app/assets/javascripts/jackpot/login.js +1 -0
  15. data/app/assets/javascripts/jackpot/payments.js +2 -0
  16. data/app/assets/javascripts/jackpot/subscriptions.js +2 -0
  17. data/app/assets/stylesheets/jackpot/application.css +9 -0
  18. data/app/assets/stylesheets/jackpot/customers.css +4 -0
  19. data/app/assets/stylesheets/jackpot/jackpot.css +10 -0
  20. data/app/controllers/jackpot/application_controller.rb +4 -0
  21. data/app/controllers/jackpot/customers_controller.rb +100 -0
  22. data/app/controllers/jackpot/payments_controller.rb +20 -0
  23. data/app/controllers/jackpot/subscriptions_controller.rb +86 -0
  24. data/app/helpers/jackpot/application_helper.rb +27 -0
  25. data/app/helpers/jackpot/customers_helper.rb +7 -0
  26. data/app/helpers/jackpot/subscriptions_helper.rb +4 -0
  27. data/app/models/jackpot/card.rb +29 -0
  28. data/app/models/jackpot/customer.rb +48 -0
  29. data/app/models/jackpot/gateway.rb +28 -0
  30. data/app/models/jackpot/payment.rb +33 -0
  31. data/app/models/jackpot/subscription.rb +13 -0
  32. data/app/models/jackpot/user.rb +25 -0
  33. data/app/views/jackpot/customers/_credit_card_form.html.erb +42 -0
  34. data/app/views/jackpot/customers/_form.html.erb +17 -0
  35. data/app/views/jackpot/customers/edit.html.erb +13 -0
  36. data/app/views/jackpot/customers/index.html.erb +30 -0
  37. data/app/views/jackpot/customers/new.html.erb +8 -0
  38. data/app/views/jackpot/customers/show.html.erb +32 -0
  39. data/app/views/jackpot/payments/create.html.erb +1 -0
  40. data/app/views/jackpot/payments/index.html.erb +25 -0
  41. data/app/views/jackpot/shared/_flash_messages.html.erb +6 -0
  42. data/app/views/jackpot/shared/_navigation.html.erb +5 -0
  43. data/app/views/jackpot/subscriptions/_form.html.erb +13 -0
  44. data/app/views/jackpot/subscriptions/edit.html.erb +6 -0
  45. data/app/views/jackpot/subscriptions/index.html.erb +29 -0
  46. data/app/views/jackpot/subscriptions/new.html.erb +4 -0
  47. data/app/views/jackpot/subscriptions/show.html.erb +23 -0
  48. data/app/views/layouts/devise.html.erb +22 -0
  49. data/app/views/layouts/jackpot/application.html.erb +39 -0
  50. data/config/initializers/jackpot_devise.rb +226 -0
  51. data/config/locales/devise.en.yml +57 -0
  52. data/config/routes.rb +17 -0
  53. data/db/migrate/20111221002616_create_jackpot_payments.rb +11 -0
  54. data/db/migrate/20111230014003_add_customer_information_to_jackpot_payments.rb +5 -0
  55. data/db/migrate/20120102223341_create_jackpot_subscriptions.rb +10 -0
  56. data/db/migrate/20120103211153_create_jackpot_customers.rb +11 -0
  57. data/db/migrate/20120104164830_add_credit_card_number_to_customer.rb +5 -0
  58. data/db/migrate/20120130173242_add_credit_card_information_to_customers.rb +7 -0
  59. data/db/migrate/20120208191815_add_billing_period_to_jackpot_subscriptions.rb +5 -0
  60. data/db/migrate/20120208191934_add_good_until_date_to_jackpot_customers.rb +6 -0
  61. data/db/migrate/20120209203542_add_subscription_and_customer_to_jackpot_payments.rb +8 -0
  62. data/db/migrate/20120209212043_rename_column_token_in_jackpot_payments.rb +5 -0
  63. data/db/migrate/20120210144038_devise_create_jackpot_users.rb +49 -0
  64. data/jackpot.gemspec +33 -0
  65. data/lib/jackpot.rb +23 -0
  66. data/lib/jackpot/configuration.rb +33 -0
  67. data/lib/jackpot/cron.rb +22 -0
  68. data/lib/jackpot/engine.rb +14 -0
  69. data/lib/jackpot/errors.rb +18 -0
  70. data/lib/jackpot/factory.rb +26 -0
  71. data/lib/jackpot/version.rb +3 -0
  72. data/lib/tasks/jackpot_tasks.rake +38 -0
  73. data/script/rails +6 -0
  74. data/spec/controllers/jackpot/customers_controller_spec.rb +170 -0
  75. data/spec/controllers/jackpot/payments_controller_spec.rb +47 -0
  76. data/spec/controllers/jackpot/subscriptions_controller_spec.rb +153 -0
  77. data/spec/dummy/.gitignore +1 -0
  78. data/spec/dummy/Rakefile +7 -0
  79. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  80. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  81. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  82. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  83. data/spec/dummy/app/mailers/.gitkeep +0 -0
  84. data/spec/dummy/app/models/.gitkeep +0 -0
  85. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  86. data/spec/dummy/config.ru +4 -0
  87. data/spec/dummy/config/application.rb +51 -0
  88. data/spec/dummy/config/boot.rb +10 -0
  89. data/spec/dummy/config/database.yml +17 -0
  90. data/spec/dummy/config/environment.rb +5 -0
  91. data/spec/dummy/config/environments/development.rb +32 -0
  92. data/spec/dummy/config/environments/production.rb +60 -0
  93. data/spec/dummy/config/environments/test.rb +41 -0
  94. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  95. data/spec/dummy/config/initializers/inflections.rb +10 -0
  96. data/spec/dummy/config/initializers/jackpot.rb +13 -0
  97. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  98. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  99. data/spec/dummy/config/initializers/session_store.rb +8 -0
  100. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  101. data/spec/dummy/config/locales/en.yml +5 -0
  102. data/spec/dummy/config/routes.rb +3 -0
  103. data/spec/dummy/db/schema.rb +68 -0
  104. data/spec/dummy/lib/assets/.gitkeep +0 -0
  105. data/spec/dummy/public/404.html +26 -0
  106. data/spec/dummy/public/422.html +26 -0
  107. data/spec/dummy/public/500.html +26 -0
  108. data/spec/dummy/public/favicon.ico +0 -0
  109. data/spec/dummy/public/index.html +5 -0
  110. data/spec/dummy/public/payment.html +36 -0
  111. data/spec/dummy/script/rails +6 -0
  112. data/spec/fixtures/vcr/Create_Customers_To_bill_monthly_my_customers_As_a_user_I_want_to_record_their_billing_information_/assigning_credit_card_information_to_customer.yml +34 -0
  113. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/.yml +34 -0
  114. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_NEVER_persist_in_the_database_the_actual_card_number.yml +34 -0
  115. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_NEVER_persist_in_the_database_the_verification_value.yml +34 -0
  116. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_persist_in_the_database_the_ONLY_last_four_digits.yml +34 -0
  117. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_persist_the_card_information.yml +34 -0
  118. data/spec/fixtures/vcr/Jackpot_Customer/_update_credit_card_number/when_card_is_valid/when_persisting/should_store_this_card_at_the_gateway.yml +34 -0
  119. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/creates_a_new_payment.yml +96 -0
  120. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/does_not_persist_credit_card_token_information.yml +96 -0
  121. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/records_the_payment_transaction_id_for_future_reference.yml +96 -0
  122. data/spec/fixtures/vcr/Jackpot_Payment/_create/with_valid_token_information/records_this_payment_information.yml +96 -0
  123. data/spec/fixtures/vcr/Jackpot_Payment/_customer_name/returns_its_customer_email.yml +96 -0
  124. data/spec/fixtures/vcr/jackpot/customer/updatecard.yml +34 -0
  125. data/spec/fixtures/vcr/jackpot/customer_expiration_date.yml +34 -0
  126. data/spec/fixtures/vcr/jackpot/receiving_payments.yml +96 -0
  127. data/spec/helpers/jackpot/customers_helper_spec.rb +16 -0
  128. data/spec/helpers/jackpot/subscriptions_helper_spec.rb +4 -0
  129. data/spec/lib/cron_spec.rb +39 -0
  130. data/spec/lib/factory_spec.rb +40 -0
  131. data/spec/models/jackpot/card_spec.rb +23 -0
  132. data/spec/models/jackpot/customer_spec.rb +140 -0
  133. data/spec/models/jackpot/gateway_spec.rb +22 -0
  134. data/spec/models/jackpot/payment_spec.rb +74 -0
  135. data/spec/models/jackpot/subscription_spec.rb +19 -0
  136. data/spec/requests/jackpot/jackpot_assign_subscription_to_customer_spec.rb +39 -0
  137. data/spec/requests/jackpot/jackpot_create_customer_spec.rb +73 -0
  138. data/spec/requests/jackpot/jackpot_create_subscriptions_spec.rb +27 -0
  139. data/spec/requests/jackpot/jackpot_receive_payments_spec.rb +34 -0
  140. data/spec/spec_helper.rb +41 -0
  141. data/spec/support/active_merchant.rb +1 -0
  142. data/spec/support/capybara.rb +6 -0
  143. data/spec/support/devise.rb +21 -0
  144. data/spec/support/factories/jackpot_customers.rb +36 -0
  145. data/spec/support/factories/jackpot_payments.rb +7 -0
  146. data/spec/support/factories/jackpot_subscriptions.rb +9 -0
  147. data/spec/support/factories/jackpot_users.rb +9 -0
  148. data/spec/support/helpers.rb +16 -0
  149. data/spec/support/routes.rb +3 -0
  150. data/spec/support/vcr.rb +10 -0
  151. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  152. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  153. data/vendor/assets/javascripts/twitter/bootstrap.js +12 -0
  154. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +91 -0
  155. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +98 -0
  156. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +154 -0
  157. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +136 -0
  158. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +92 -0
  159. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +209 -0
  160. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +95 -0
  161. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +125 -0
  162. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +130 -0
  163. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +270 -0
  164. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +51 -0
  165. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +271 -0
  166. data/vendor/assets/stylesheets/twitter/bootstrap/bootstrap-responsive.css +567 -0
  167. data/vendor/assets/stylesheets/twitter/bootstrap/bootstrap.css.erb +3366 -0
  168. metadata +351 -0
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=5105105105105100&cvv=123&ccexp=0513&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:36:46 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=125106857
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:36:46 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=4242424242424242&cvv=123&ccexp=0113&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:35:40 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=872759264
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:35:40 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=4242424242424242&cvv=123&ccexp=0113&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:35:50 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '203'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=1134180078
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:35:50 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=4242424242424242&cvv=123&ccexp=0113&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:35:52 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=661586025
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:35:52 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=4242424242424242&cvv=123&ccexp=0113&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:35:47 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=817906347
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:35:48 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=4242424242424242&cvv=123&ccexp=0113&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:35:44 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=916235132
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:35:45 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,34 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=4242424242424242&cvv=123&ccexp=0113&firstname=John&lastname=Doe
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:35:42 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=1979016654
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:35:42 GMT
34
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,96 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=5555555555554444&cvv=123&ccexp=0113&firstname=foo&lastname=bar
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:36:03 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '202'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=514257781
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:36:04 GMT
34
+ - request:
35
+ method: post
36
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
37
+ body: username=demo&password=password&type=auth&orderid=&customer_vault_id=514257781&currency=USD&tax=&amount=42.00
38
+ headers:
39
+ content-type:
40
+ - application/x-www-form-urlencoded
41
+ accept:
42
+ - ! '*/*'
43
+ user-agent:
44
+ - Ruby
45
+ connection:
46
+ - close
47
+ response:
48
+ status:
49
+ code: 200
50
+ message: OK
51
+ headers:
52
+ date:
53
+ - Fri, 10 Feb 2012 01:36:07 GMT
54
+ server:
55
+ - Apache
56
+ content-length:
57
+ - '215'
58
+ connection:
59
+ - close
60
+ content-type:
61
+ - text/html
62
+ body: response=1&responsetext=SUCCESS&authcode=123456&transactionid=1561161290&avsresponse=&cvvresponse=&orderid=&type=auth&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=514257781
63
+ http_version: '1.1'
64
+ recorded_at: Fri, 10 Feb 2012 01:36:09 GMT
65
+ - request:
66
+ method: post
67
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
68
+ body: username=demo&password=password&type=capture&transactionid=1561161290&amount=42.00
69
+ headers:
70
+ content-type:
71
+ - application/x-www-form-urlencoded
72
+ accept:
73
+ - ! '*/*'
74
+ user-agent:
75
+ - Ruby
76
+ connection:
77
+ - close
78
+ response:
79
+ status:
80
+ code: 200
81
+ message: OK
82
+ headers:
83
+ date:
84
+ - Fri, 10 Feb 2012 01:36:10 GMT
85
+ server:
86
+ - Apache
87
+ content-length:
88
+ - '209'
89
+ connection:
90
+ - close
91
+ content-type:
92
+ - text/html
93
+ body: response=1&responsetext=SUCCESS&authcode=123456&transactionid=1561161290&avsresponse=&cvvresponse=&orderid=&type=capture&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=
94
+ http_version: '1.1'
95
+ recorded_at: Fri, 10 Feb 2012 01:36:12 GMT
96
+ recorded_with: VCR 2.0.0.rc1
@@ -0,0 +1,96 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
6
+ body: username=demo&password=password&customer_vault=add_customer&customer_vault_id=&ccnumber=5555555555554444&cvv=123&ccexp=0113&firstname=foo&lastname=bar
7
+ headers:
8
+ content-type:
9
+ - application/x-www-form-urlencoded
10
+ accept:
11
+ - ! '*/*'
12
+ user-agent:
13
+ - Ruby
14
+ connection:
15
+ - close
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Fri, 10 Feb 2012 01:36:35 GMT
23
+ server:
24
+ - Apache
25
+ content-length:
26
+ - '203'
27
+ connection:
28
+ - close
29
+ content-type:
30
+ - text/html
31
+ body: response=1&responsetext=Customer Added&authcode=&transactionid=&avsresponse=&cvvresponse=&orderid=&type=&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=1744647340
32
+ http_version: '1.1'
33
+ recorded_at: Fri, 10 Feb 2012 01:36:36 GMT
34
+ - request:
35
+ method: post
36
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
37
+ body: username=demo&password=password&type=auth&orderid=&customer_vault_id=1744647340&currency=USD&tax=&amount=42.00
38
+ headers:
39
+ content-type:
40
+ - application/x-www-form-urlencoded
41
+ accept:
42
+ - ! '*/*'
43
+ user-agent:
44
+ - Ruby
45
+ connection:
46
+ - close
47
+ response:
48
+ status:
49
+ code: 200
50
+ message: OK
51
+ headers:
52
+ date:
53
+ - Fri, 10 Feb 2012 01:36:38 GMT
54
+ server:
55
+ - Apache
56
+ content-length:
57
+ - '216'
58
+ connection:
59
+ - close
60
+ content-type:
61
+ - text/html
62
+ body: response=1&responsetext=SUCCESS&authcode=123456&transactionid=1561161651&avsresponse=&cvvresponse=&orderid=&type=auth&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=1744647340
63
+ http_version: '1.1'
64
+ recorded_at: Fri, 10 Feb 2012 01:36:40 GMT
65
+ - request:
66
+ method: post
67
+ uri: https://secure.braintreepaymentgateway.com/api/transact.php
68
+ body: username=demo&password=password&type=capture&transactionid=1561161651&amount=42.00
69
+ headers:
70
+ content-type:
71
+ - application/x-www-form-urlencoded
72
+ accept:
73
+ - ! '*/*'
74
+ user-agent:
75
+ - Ruby
76
+ connection:
77
+ - close
78
+ response:
79
+ status:
80
+ code: 200
81
+ message: OK
82
+ headers:
83
+ date:
84
+ - Fri, 10 Feb 2012 01:36:42 GMT
85
+ server:
86
+ - Apache
87
+ content-length:
88
+ - '209'
89
+ connection:
90
+ - close
91
+ content-type:
92
+ - text/html
93
+ body: response=1&responsetext=SUCCESS&authcode=123456&transactionid=1561161651&avsresponse=&cvvresponse=&orderid=&type=capture&response_code=100&merchant_defined_field_6=&merchant_defined_field_7=&customer_vault_id=
94
+ http_version: '1.1'
95
+ recorded_at: Fri, 10 Feb 2012 01:36:43 GMT
96
+ recorded_with: VCR 2.0.0.rc1