vaulted_billing 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. data/LICENSE +19 -0
  2. data/lib/vaulted_billing/gateways/bogus.rb +2 -0
  3. data/lib/vaulted_billing/version.rb +1 -1
  4. data/spec/certification/ipcommerce/README.md +9 -0
  5. data/spec/certification/ipcommerce/TODO.md +1 -0
  6. data/spec/certification/ipcommerce/host_capture_ecommerce.rb +318 -0
  7. data/spec/certification/ipcommerce/ipcommerce_transaction.rb +28 -0
  8. data/spec/certification/ipcommerce/terminal_capture_ecommerce.rb +298 -0
  9. data/spec/config.example.yml +18 -0
  10. data/spec/factories/credit_cards.rb +38 -0
  11. data/spec/factories/customers.rb +7 -0
  12. data/spec/factories/sequences.rb +22 -0
  13. data/spec/fixtures/net/authorize_net_cim/add_customer/failure.yml +38 -0
  14. data/spec/fixtures/net/authorize_net_cim/add_customer/success.yml +39 -0
  15. data/spec/fixtures/net/authorize_net_cim/add_customer_credit_card/failure.yml +83 -0
  16. data/spec/fixtures/net/authorize_net_cim/add_customer_credit_card/success.yml +81 -0
  17. data/spec/fixtures/net/authorize_net_cim/authorize/failure.yml +121 -0
  18. data/spec/fixtures/net/authorize_net_cim/authorize/success.yml +121 -0
  19. data/spec/fixtures/net/authorize_net_cim/capture/failure.yml +161 -0
  20. data/spec/fixtures/net/authorize_net_cim/capture/success.yml +160 -0
  21. data/spec/fixtures/net/authorize_net_cim/purchase/failure.yml +122 -0
  22. data/spec/fixtures/net/authorize_net_cim/purchase/success.yml +122 -0
  23. data/spec/fixtures/net/authorize_net_cim/refund/failure.yml +123 -0
  24. data/spec/fixtures/net/authorize_net_cim/refund/failure_2.yml +43 -0
  25. data/spec/fixtures/net/authorize_net_cim/remove_customer/failure.yml +76 -0
  26. data/spec/fixtures/net/authorize_net_cim/remove_customer/success.yml +75 -0
  27. data/spec/fixtures/net/authorize_net_cim/remove_customer_credit_card/failure.yml +156 -0
  28. data/spec/fixtures/net/authorize_net_cim/remove_customer_credit_card/success.yml +118 -0
  29. data/spec/fixtures/net/authorize_net_cim/update_customer/failure.yml +77 -0
  30. data/spec/fixtures/net/authorize_net_cim/update_customer/success.yml +76 -0
  31. data/spec/fixtures/net/authorize_net_cim/update_customer_credit_card/failure.yml +125 -0
  32. data/spec/fixtures/net/authorize_net_cim/update_customer_credit_card/success.yml +124 -0
  33. data/spec/fixtures/net/authorize_net_cim/void/success.yml +159 -0
  34. data/spec/fixtures/net/ipcommerce/add_customer_credit_card/failure.yml +53 -0
  35. data/spec/fixtures/net/ipcommerce/add_customer_credit_card/success.yml +103 -0
  36. data/spec/fixtures/net/ipcommerce/authorize/existing/failure.yml +51 -0
  37. data/spec/fixtures/net/ipcommerce/authorize/existing/success.yml +105 -0
  38. data/spec/fixtures/net/ipcommerce/authorize/new/avs/bad_format.yml +53 -0
  39. data/spec/fixtures/net/ipcommerce/authorize/new/avs/issuer_not_certified.yml +53 -0
  40. data/spec/fixtures/net/ipcommerce/authorize/new/avs/match.yml +53 -0
  41. data/spec/fixtures/net/ipcommerce/authorize/new/avs/no_match.yml +53 -0
  42. data/spec/fixtures/net/ipcommerce/authorize/new/avs/no_response_from_card_association.yml +53 -0
  43. data/spec/fixtures/net/ipcommerce/authorize/new/avs/not_included.yml +53 -0
  44. data/spec/fixtures/net/ipcommerce/authorize/new/avs/not_sent.yml +53 -0
  45. data/spec/fixtures/net/ipcommerce/authorize/new/avs/not_verified.yml +53 -0
  46. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/invalid.yml +53 -0
  47. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/issuer_not_certified.yml +53 -0
  48. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/no_code_present.yml +53 -0
  49. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/no_match.yml +53 -0
  50. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/no_response.yml +53 -0
  51. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/not_applicable.yml +53 -0
  52. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/not_processed.yml +53 -0
  53. data/spec/fixtures/net/ipcommerce/authorize/new/cvv/should_have_been_present.yml +53 -0
  54. data/spec/fixtures/net/ipcommerce/authorize/new/failure.yml +53 -0
  55. data/spec/fixtures/net/ipcommerce/authorize/new/success.yml +53 -0
  56. data/spec/fixtures/net/ipcommerce/capture/failure.yml +78 -0
  57. data/spec/fixtures/net/ipcommerce/capture/invalid.yml +78 -0
  58. data/spec/fixtures/net/ipcommerce/capture/success.yml +78 -0
  59. data/spec/fixtures/net/ipcommerce/failover.yml +53 -0
  60. data/spec/fixtures/net/ipcommerce/purchase/existing/failure.yml +51 -0
  61. data/spec/fixtures/net/ipcommerce/purchase/existing/success.yml +105 -0
  62. data/spec/fixtures/net/ipcommerce/purchase/new/failure.yml +53 -0
  63. data/spec/fixtures/net/ipcommerce/purchase/new/success.yml +53 -0
  64. data/spec/fixtures/net/ipcommerce/refund/failure.yml +78 -0
  65. data/spec/fixtures/net/ipcommerce/refund/success.yml +80 -0
  66. data/spec/fixtures/net/ipcommerce/update_customer_credit_card/failure.yml +53 -0
  67. data/spec/fixtures/net/ipcommerce/update_customer_credit_card/success.yml +103 -0
  68. data/spec/fixtures/net/ipcommerce/void/failure.yml +78 -0
  69. data/spec/fixtures/net/ipcommerce/void/success.yml +78 -0
  70. data/spec/fixtures/net/nmi_customer_vault/add_customer_credit_card/failure.yml +26 -0
  71. data/spec/fixtures/net/nmi_customer_vault/add_customer_credit_card/success.yml +26 -0
  72. data/spec/fixtures/net/nmi_customer_vault/authorize/decline.yml +51 -0
  73. data/spec/fixtures/net/nmi_customer_vault/authorize/success.yml +51 -0
  74. data/spec/fixtures/net/nmi_customer_vault/capture/failure.yml +76 -0
  75. data/spec/fixtures/net/nmi_customer_vault/capture/success.yml +76 -0
  76. data/spec/fixtures/net/nmi_customer_vault/purchase/decline.yml +51 -0
  77. data/spec/fixtures/net/nmi_customer_vault/purchase/success.yml +51 -0
  78. data/spec/fixtures/net/nmi_customer_vault/refund/failure.yml +101 -0
  79. data/spec/fixtures/net/nmi_customer_vault/remove_customer_credit_card/failure.yml +26 -0
  80. data/spec/fixtures/net/nmi_customer_vault/remove_customer_credit_card/success.yml +51 -0
  81. data/spec/fixtures/net/nmi_customer_vault/update_customer_credit_card/success.yml +51 -0
  82. data/spec/fixtures/net/nmi_customer_vault/void/failure.yml +26 -0
  83. data/spec/fixtures/net/nmi_customer_vault/void/success.yml +76 -0
  84. data/spec/models/vaulted_billing/configuration_spec.rb +62 -0
  85. data/spec/models/vaulted_billing/core_ext/hash_spec.rb +47 -0
  86. data/spec/models/vaulted_billing/credit_card_spec.rb +61 -0
  87. data/spec/models/vaulted_billing/gateway_spec.rb +115 -0
  88. data/spec/models/vaulted_billing/http_spec.rb +154 -0
  89. data/spec/models/vaulted_billing/transaction_spec.rb +60 -0
  90. data/spec/models/vaulted_billing_spec.rb +16 -0
  91. data/spec/requests/authorize_net_cim_spec.rb +506 -0
  92. data/spec/requests/bogus_spec.rb +144 -0
  93. data/spec/requests/ipcommerce_spec.rb +518 -0
  94. data/spec/requests/nmi_customer_vault_spec.rb +390 -0
  95. data/spec/spec_helper.rb +12 -0
  96. data/spec/support/_vaulted_billing.rb +8 -0
  97. data/spec/support/factory_girl.rb +5 -0
  98. data/spec/support/faker.rb +1 -0
  99. data/spec/support/helpers.rb +46 -0
  100. data/spec/support/logging.rb +2 -0
  101. data/spec/support/test_exception.rb +1 -0
  102. data/spec/support/vcr.rb +49 -0
  103. data/spec/support/webmock.rb +7 -0
  104. metadata +312 -37
@@ -0,0 +1,18 @@
1
+ test_mode: true
2
+
3
+ authorize_net_cim:
4
+ username: authorize-net-username
5
+ password: authorize-net-password
6
+ test_mode: true
7
+
8
+ nmi_customer_vault:
9
+ username: nmi-vault-username
10
+ password: nmi-vault-password
11
+ test_mode: true
12
+
13
+ ipcommerce:
14
+ username: ipcommerce-username
15
+ test_mode: true
16
+ raw_options:
17
+ application_id: application-id
18
+ service_id: E4FB800001
@@ -0,0 +1,38 @@
1
+ Factory.define :credit_card, :class => VaultedBilling::CreditCard do |c|
2
+ c.expires_on { Date.today + 365 }
3
+ c.card_number { Factory.next :credit_card_number }
4
+ c.cvv_number '123'
5
+ c.first_name { Faker::Name.first_name }
6
+ c.last_name { Faker::Name.last_name }
7
+ c.street_address { Faker::Address.street_address }
8
+ c.locality { Faker::Address.city }
9
+ c.region { Faker::Address.us_state }
10
+ c.postal_code { Faker::Address.zip_code }
11
+ c.country 'US'
12
+ c.phone { Faker::PhoneNumber.phone_number }
13
+ end
14
+
15
+ Factory.define :existing_credit_card, :parent => :credit_card do |c|
16
+ c.vault_id { Factory.next :identifier }
17
+ end
18
+
19
+ Factory.define :ipcommerce_credit_card, :parent => :credit_card do |c|
20
+ c.card_number '5454545454545454'
21
+ c.expires_on Date.new(2010, 12, 31)
22
+ c.region { Faker::Address.state_abbr }
23
+ end
24
+
25
+ Factory.define :invalid_credit_card, :parent => :credit_card do |c|
26
+ c.card_number { Factory.next :invalid_credit_card_number }
27
+ end
28
+
29
+ Factory.define :blank_credit_card, :class => VaultedBilling::CreditCard do |c|
30
+ end
31
+
32
+ Factory.define :expires_credit_card, :class => VaultedBilling::CreditCard do |c|
33
+ c.expires_on { Date.today + 365 }
34
+ end
35
+
36
+ Factory.define :failure_credit_card, :parent => :credit_card do |c|
37
+ c.card_number { Factory.next :failure_credit_card_number }
38
+ end
@@ -0,0 +1,7 @@
1
+ Factory.define :customer, :class => VaultedBilling::Customer do |c|
2
+ c.email { Faker::Internet.email }
3
+ end
4
+
5
+ Factory.define :existing_customer, :parent => :customer do |c|
6
+ c.vault_id { Factory.next(:identifier) }
7
+ end
@@ -0,0 +1,22 @@
1
+ require 'digest/md5'
2
+
3
+ Factory.sequence :identifier do |i|
4
+ Digest::MD5.hexdigest("---#{Time.now.to_f}---#{$$}--#{rand(10_000_000)}---#{rand(10_000)}")
5
+ end
6
+
7
+ Factory.sequence :credit_card_number do |c|
8
+ cards = %w(
9
+ 5561825156630626 5120186265015108 5439365422152873
10
+ 5285948609760819 5459804026655480 5245621729327509
11
+ 5228208711376826 5511194136987213 5230002140732287
12
+ 5288407810509231 4539244255469542 4532409240022071
13
+ 4556960115460938 4539482164563803 4024007199960179
14
+ 4913379750143840 4716016665352277 4838202546066137
15
+ 4024007191655199 4033649363642395 348690499380524
16
+ 346897195593746 375446305355283 343364053762320
17
+ )
18
+ cards[rand(cards.size)]
19
+ end
20
+
21
+ Factory.sequence(:invalid_credit_card_number) { |c| '4111111111111112' }
22
+ Factory.sequence(:failure_credit_card_number) { |c| VaultedBilling::Gateways::Bogus::FailureCards[rand(VaultedBilling::Gateways::Bogus::FailureCards.size)] }
@@ -0,0 +1,38 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerProfileRequest
7
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
8
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
9
+ \ </merchantAuthentication>\n <profile>\n </profile>\n</createCustomerProfileRequest>\n"
10
+ headers:
11
+ content-type:
12
+ - text/xml
13
+ user-agent:
14
+ - vaulted_billing/1.0.2
15
+ response: !ruby/struct:VCR::Response
16
+ status: !ruby/struct:VCR::ResponseStatus
17
+ code: 200
18
+ message: OK
19
+ headers:
20
+ date:
21
+ - Wed, 10 Aug 2011 17:56:17 GMT
22
+ server:
23
+ - Microsoft-IIS/6.0
24
+ x-powered-by:
25
+ - ASP.NET
26
+ x-aspnet-version:
27
+ - 2.0.50727
28
+ cache-control:
29
+ - private
30
+ content-type:
31
+ - text/xml; charset=utf-8
32
+ content-length:
33
+ - '408'
34
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerProfileResponse
35
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
36
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Error</resultCode><message><code>E00041</code><text>One
37
+ or more fields in the profile must contain a value.</text></message></messages></createCustomerProfileResponse>"
38
+ http_version: '1.1'
@@ -0,0 +1,39 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerProfileRequest
7
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
8
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
9
+ \ </merchantAuthentication>\n <profile>\n <email>lauryn.kilback@champlinrogahn.org</email>\n
10
+ \ </profile>\n</createCustomerProfileRequest>\n"
11
+ headers:
12
+ content-type:
13
+ - text/xml
14
+ user-agent:
15
+ - vaulted_billing/1.0.2
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Wed, 10 Aug 2011 17:55:11 GMT
23
+ server:
24
+ - Microsoft-IIS/6.0
25
+ x-powered-by:
26
+ - ASP.NET
27
+ x-aspnet-version:
28
+ - 2.0.50727
29
+ cache-control:
30
+ - private
31
+ content-type:
32
+ - text/xml; charset=utf-8
33
+ content-length:
34
+ - '504'
35
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerProfileResponse
36
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
37
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><customerProfileId>4309715</customerProfileId><customerPaymentProfileIdList
38
+ /><customerShippingAddressIdList /><validationDirectResponseList /></createCustomerProfileResponse>"
39
+ http_version: '1.1'
@@ -0,0 +1,83 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerProfileRequest
7
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
8
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
9
+ \ </merchantAuthentication>\n <profile>\n <email>cathy_abbott@spencerconnelly.org</email>\n
10
+ \ </profile>\n</createCustomerProfileRequest>\n"
11
+ headers:
12
+ content-type:
13
+ - text/xml
14
+ user-agent:
15
+ - vaulted_billing/1.0.2
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Wed, 10 Aug 2011 17:56:31 GMT
23
+ server:
24
+ - Microsoft-IIS/6.0
25
+ x-powered-by:
26
+ - ASP.NET
27
+ x-aspnet-version:
28
+ - 2.0.50727
29
+ cache-control:
30
+ - private
31
+ content-type:
32
+ - text/xml; charset=utf-8
33
+ content-length:
34
+ - '504'
35
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerProfileResponse
36
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
37
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><customerProfileId>4309785</customerProfileId><customerPaymentProfileIdList
38
+ /><customerShippingAddressIdList /><validationDirectResponseList /></createCustomerProfileResponse>"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
42
+ method: :post
43
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
44
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerPaymentProfileRequest
45
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
46
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
47
+ \ </merchantAuthentication>\n <customerProfileId>4309785</customerProfileId>\n
48
+ \ <paymentProfile>\n <billTo>\n <firstName>Rossie</firstName>\n <lastName>Walker</lastName>\n
49
+ \ <address>6144 Pearline Shores</address>\n <city>New Cordeliahaven</city>\n
50
+ \ <state>Washington</state>\n <zip>28031-5393</zip>\n <country>US</country>\n
51
+ \ <phoneNumber>334.517.6857</phoneNumber>\n </billTo>\n <payment>\n
52
+ \ <creditCard>\n <expirationDate>2012-08</expirationDate>\n </creditCard>\n
53
+ \ </payment>\n </paymentProfile>\n</createCustomerPaymentProfileRequest>\n"
54
+ headers:
55
+ content-type:
56
+ - text/xml
57
+ user-agent:
58
+ - vaulted_billing/1.0.2
59
+ response: !ruby/struct:VCR::Response
60
+ status: !ruby/struct:VCR::ResponseStatus
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ date:
65
+ - Wed, 10 Aug 2011 17:56:32 GMT
66
+ server:
67
+ - Microsoft-IIS/6.0
68
+ x-powered-by:
69
+ - ASP.NET
70
+ x-aspnet-version:
71
+ - 2.0.50727
72
+ cache-control:
73
+ - private
74
+ content-type:
75
+ - text/xml; charset=utf-8
76
+ content-length:
77
+ - '604'
78
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><ErrorResponse xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
79
+ xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Error</resultCode><message><code>E00003</code><text>The
80
+ element 'creditCard' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'
81
+ has invalid child element 'expirationDate' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
82
+ List of possible elements expected: 'cardNumber' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.</text></message></messages></ErrorResponse>"
83
+ http_version: '1.1'
@@ -0,0 +1,81 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerProfileRequest
7
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
8
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
9
+ \ </merchantAuthentication>\n <profile>\n <email>eino@kuphal.org</email>\n
10
+ \ </profile>\n</createCustomerProfileRequest>\n"
11
+ headers:
12
+ content-type:
13
+ - text/xml
14
+ user-agent:
15
+ - vaulted_billing/1.0.2
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Wed, 10 Aug 2011 17:56:28 GMT
23
+ server:
24
+ - Microsoft-IIS/6.0
25
+ x-powered-by:
26
+ - ASP.NET
27
+ x-aspnet-version:
28
+ - 2.0.50727
29
+ cache-control:
30
+ - private
31
+ content-type:
32
+ - text/xml; charset=utf-8
33
+ content-length:
34
+ - '504'
35
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerProfileResponse
36
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
37
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><customerProfileId>4309778</customerProfileId><customerPaymentProfileIdList
38
+ /><customerShippingAddressIdList /><validationDirectResponseList /></createCustomerProfileResponse>"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
42
+ method: :post
43
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
44
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerPaymentProfileRequest
45
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
46
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
47
+ \ </merchantAuthentication>\n <customerProfileId>4309778</customerProfileId>\n
48
+ \ <paymentProfile>\n <billTo>\n <firstName>Okey</firstName>\n <lastName>Dooley</lastName>\n
49
+ \ <address>04852 Gunner Drive</address>\n <city>Stromanbury</city>\n
50
+ \ <state>Delaware</state>\n <zip>88530-7912</zip>\n <country>US</country>\n
51
+ \ <phoneNumber>1-848-388-8420 x115</phoneNumber>\n </billTo>\n <payment>\n
52
+ \ <creditCard>\n <cardNumber>343364053762320</cardNumber>\n <expirationDate>2012-08</expirationDate>\n
53
+ \ </creditCard>\n </payment>\n </paymentProfile>\n</createCustomerPaymentProfileRequest>\n"
54
+ headers:
55
+ content-type:
56
+ - text/xml
57
+ user-agent:
58
+ - vaulted_billing/1.0.2
59
+ response: !ruby/struct:VCR::Response
60
+ status: !ruby/struct:VCR::ResponseStatus
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ date:
65
+ - Wed, 10 Aug 2011 17:56:29 GMT
66
+ server:
67
+ - Microsoft-IIS/6.0
68
+ x-powered-by:
69
+ - ASP.NET
70
+ x-aspnet-version:
71
+ - 2.0.50727
72
+ cache-control:
73
+ - private
74
+ content-type:
75
+ - text/xml; charset=utf-8
76
+ content-length:
77
+ - '435'
78
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerPaymentProfileResponse
79
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
80
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><customerPaymentProfileId>3802859</customerPaymentProfileId></createCustomerPaymentProfileResponse>"
81
+ http_version: '1.1'
@@ -0,0 +1,121 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :post
5
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
6
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerProfileRequest
7
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
8
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
9
+ \ </merchantAuthentication>\n <profile>\n <email>elmore.mcclure@rowe.org</email>\n
10
+ \ </profile>\n</createCustomerProfileRequest>\n"
11
+ headers:
12
+ content-type:
13
+ - text/xml
14
+ user-agent:
15
+ - vaulted_billing/1.0.2
16
+ response: !ruby/struct:VCR::Response
17
+ status: !ruby/struct:VCR::ResponseStatus
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ date:
22
+ - Wed, 10 Aug 2011 17:56:53 GMT
23
+ server:
24
+ - Microsoft-IIS/6.0
25
+ x-powered-by:
26
+ - ASP.NET
27
+ x-aspnet-version:
28
+ - 2.0.50727
29
+ cache-control:
30
+ - private
31
+ content-type:
32
+ - text/xml; charset=utf-8
33
+ content-length:
34
+ - '504'
35
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerProfileResponse
36
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
37
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><customerProfileId>4309855</customerProfileId><customerPaymentProfileIdList
38
+ /><customerShippingAddressIdList /><validationDirectResponseList /></createCustomerProfileResponse>"
39
+ http_version: '1.1'
40
+ - !ruby/struct:VCR::HTTPInteraction
41
+ request: !ruby/struct:VCR::Request
42
+ method: :post
43
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
44
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerPaymentProfileRequest
45
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
46
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
47
+ \ </merchantAuthentication>\n <customerProfileId>4309855</customerProfileId>\n
48
+ \ <paymentProfile>\n <billTo>\n <firstName>Loma</firstName>\n <lastName>Dach</lastName>\n
49
+ \ <address>985 Rohan Green</address>\n <city>Dachfurt</city>\n <state>Louisiana</state>\n
50
+ \ <zip>79940-5180</zip>\n <country>US</country>\n <phoneNumber>681.173.0952</phoneNumber>\n
51
+ \ </billTo>\n <payment>\n <creditCard>\n <cardNumber>5511194136987213</cardNumber>\n
52
+ \ <expirationDate>2012-08</expirationDate>\n </creditCard>\n </payment>\n
53
+ \ </paymentProfile>\n</createCustomerPaymentProfileRequest>\n"
54
+ headers:
55
+ content-type:
56
+ - text/xml
57
+ user-agent:
58
+ - vaulted_billing/1.0.2
59
+ response: !ruby/struct:VCR::Response
60
+ status: !ruby/struct:VCR::ResponseStatus
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ date:
65
+ - Wed, 10 Aug 2011 17:56:54 GMT
66
+ server:
67
+ - Microsoft-IIS/6.0
68
+ x-powered-by:
69
+ - ASP.NET
70
+ x-aspnet-version:
71
+ - 2.0.50727
72
+ cache-control:
73
+ - private
74
+ content-type:
75
+ - text/xml; charset=utf-8
76
+ content-length:
77
+ - '435'
78
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><createCustomerPaymentProfileResponse
79
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
80
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Ok</resultCode><message><code>I00001</code><text>Successful.</text></message></messages><customerPaymentProfileId>3802875</customerPaymentProfileId></createCustomerPaymentProfileResponse>"
81
+ http_version: '1.1'
82
+ - !ruby/struct:VCR::HTTPInteraction
83
+ request: !ruby/struct:VCR::Request
84
+ method: :post
85
+ uri: https://apitest.authorize.net:443/xml/v1/request.api
86
+ body: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<createCustomerProfileTransactionRequest
87
+ xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">\n <merchantAuthentication>\n
88
+ \ <name>%{AUTHORIZE_NET_CIM_USERNAME}</name>\n <transactionKey>2Rsb3965z97ZgAWa</transactionKey>\n
89
+ \ </merchantAuthentication>\n <transaction>\n <profileTransAuthOnly>\n <amount>0.0</amount>\n
90
+ \ <customerProfileId>4309855</customerProfileId>\n <customerPaymentProfileId>3802875</customerPaymentProfileId>\n
91
+ \ </profileTransAuthOnly>\n </transaction>\n <extraOptions></extraOptions>\n</createCustomerProfileTransactionRequest>\n"
92
+ headers:
93
+ content-type:
94
+ - text/xml
95
+ user-agent:
96
+ - vaulted_billing/1.0.2
97
+ response: !ruby/struct:VCR::Response
98
+ status: !ruby/struct:VCR::ResponseStatus
99
+ code: 200
100
+ message: OK
101
+ headers:
102
+ date:
103
+ - Wed, 10 Aug 2011 17:56:55 GMT
104
+ server:
105
+ - Microsoft-IIS/6.0
106
+ x-powered-by:
107
+ - ASP.NET
108
+ x-aspnet-version:
109
+ - 2.0.50727
110
+ cache-control:
111
+ - private
112
+ content-type:
113
+ - text/xml; charset=utf-8
114
+ content-length:
115
+ - '495'
116
+ body: ! "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><ErrorResponse xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
117
+ xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\"><messages><resultCode>Error</resultCode><message><code>E00003</code><text>The
118
+ 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:amount' element is invalid - The value
119
+ '0.0' is invalid according to its datatype 'Decimal' - The MinInclusive constraint
120
+ failed.</text></message></messages></ErrorResponse>"
121
+ http_version: '1.1'