fat_zebra_multi 3.2.0.1 → 3.2.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +3 -3
  4. data/README.md +5 -4
  5. data/fat_zebra_multi.gemspec +4 -3
  6. data/lib/fat_zebra/authenticate.rb +64 -0
  7. data/lib/fat_zebra/card.rb +1 -0
  8. data/lib/fat_zebra/paypal/authorization.rb +49 -0
  9. data/lib/fat_zebra/paypal/billing_agreement.rb +56 -0
  10. data/lib/fat_zebra/paypal/capture.rb +36 -0
  11. data/lib/fat_zebra/paypal/order.rb +22 -0
  12. data/lib/fat_zebra/paypal/refund.rb +22 -0
  13. data/lib/fat_zebra/util.rb +1 -1
  14. data/lib/fat_zebra/version.rb +1 -1
  15. data/lib/fat_zebra.rb +8 -1
  16. data/spec/cassettes/FatZebra_Authenticate/_authenticate/validations/1_3_5_1.yml +46 -0
  17. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_challenge_response/1_3_3_1.yml +90 -0
  18. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_challenge_response/1_3_3_2.yml +90 -0
  19. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_1.yml +90 -0
  20. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_2.yml +90 -0
  21. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_1.yml +90 -0
  22. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_2.yml +87 -0
  23. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_3.yml +92 -0
  24. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_4.yml +91 -0
  25. data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_type_validation/1_3_4_1.yml +46 -0
  26. data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_invalid/returns_error_when_invalid_token.yml +47 -0
  27. data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_valid/decodes_JWT.yml +87 -0
  28. data/spec/cassettes/FatZebra_Authenticate/_session/returns_JWT_with_given_params.yml +44 -0
  29. data/spec/cassettes/FatZebra_Authenticate/_session/returns_JWT_with_no_amount.yml +44 -0
  30. data/spec/cassettes/FatZebra_Authenticate/_session/returns_error_when_amount_is_invalid.yml +44 -0
  31. data/spec/cassettes/FatZebra_Authenticate/_session/returns_error_when_currency_is_invalid.yml +46 -0
  32. data/spec/cassettes/FatZebra_Card/_find/1_3_1.yml +111 -0
  33. data/spec/cassettes/FatZebra_Card/_find/1_3_2.yml +111 -0
  34. data/spec/cassettes/FatZebra_Paypal_Authorization/_capture/returns_a_new_capture_record.yml +45 -0
  35. data/spec/cassettes/{FatZebra_Authorise/_jwt_token/returns_JWT_with_no_params.yml → FatZebra_Paypal_Authorization/_find/when_found/returns_authorization.yml} +5 -5
  36. data/spec/cassettes/FatZebra_Paypal_Authorization/_search/with_date_filter/returns_records_created_after_start_date.yml +46 -0
  37. data/spec/cassettes/FatZebra_Paypal_Authorization/_void/returns_a_voided_capture_record.yml +44 -0
  38. data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_charge/Valid_payload/returns_a_new_order_record.yml +48 -0
  39. data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_find/when_found/returns_billing_agreement.yml +48 -0
  40. data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_search/with_date_filter/returns_records_created_after_start_date.yml +48 -0
  41. data/spec/cassettes/FatZebra_Paypal_Capture/_find/when_found/returns_capture.yml +47 -0
  42. data/spec/cassettes/FatZebra_Paypal_Capture/_refund/returns_a_new_refund_record.yml +45 -0
  43. data/spec/cassettes/FatZebra_Paypal_Capture/_search/with_date_filter/returns_records_created_after_start_date.yml +49 -0
  44. data/spec/cassettes/FatZebra_Paypal_Order/_find/when_found/returns_order.yml +48 -0
  45. data/spec/cassettes/FatZebra_Paypal_Order/_search/with_date_filter/returns_orders_created_after_start_date.yml +55 -0
  46. data/spec/cassettes/{FatZebra_Authorise/_jwt_token/returns_JWT_with_some_params.yml → FatZebra_Paypal_Refund/_find/when_found/returns_refund.yml} +6 -5
  47. data/spec/cassettes/FatZebra_Paypal_Refund/_search/with_date_filter/returns_all_refund_records_created_after_start_date.yml +50 -0
  48. data/spec/lib/fat_zebra/authenticate_spec.rb +187 -0
  49. data/spec/lib/fat_zebra/card_spec.rb +8 -0
  50. data/spec/lib/fat_zebra/paypal/authorization_spec.rb +79 -0
  51. data/spec/lib/fat_zebra/paypal/billing_agreement_spec.rb +62 -0
  52. data/spec/lib/fat_zebra/paypal/capture_spec.rb +60 -0
  53. data/spec/lib/fat_zebra/paypal/order_spec.rb +35 -0
  54. data/spec/lib/fat_zebra/paypal/refund_spec.rb +36 -0
  55. data/spec/spec_helper.rb +0 -1
  56. data/spec/support/payloads.rb +129 -36
  57. metadata +65 -18
  58. data/lib/fat_zebra/authorise.rb +0 -49
  59. data/spec/cassettes/FatZebra_Authorise/_authorise/with_challenge_response/1_2_3_1.yml +0 -48
  60. data/spec/cassettes/FatZebra_Authorise/_authorise/with_challenge_response/1_2_3_2.yml +0 -48
  61. data/spec/cassettes/FatZebra_Authorise/_authorise/with_frictionless_response/1_2_2_1.yml +0 -48
  62. data/spec/cassettes/FatZebra_Authorise/_authorise/with_frictionless_response/1_2_2_2.yml +0 -48
  63. data/spec/cassettes/FatZebra_Authorise/_authorise/with_invalid_input/1_2_1_1.yml +0 -50
  64. data/spec/cassettes/FatZebra_Authorise/_jwt_token/returns_JWT_with_given_params.yml +0 -46
  65. data/spec/lib/fat_zebra/authorise_spec.rb +0 -101
@@ -0,0 +1,90 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - 5eec467855ac8c00a5aea3a3188a4d7b
35
+ X-Runtime:
36
+ - '0.270447'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"w85zqhss15f3kza55c9p","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:36:49 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"card_token":"w85zqhss15f3kza55c9p","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"2cd5d82a-579b-4d4c-8f55-f96d8338aa2f","customer":{"address_1":"23
52
+ Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
53
+ Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"b2376865132d5f61e688aede1f014452","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
54
+ (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
55
+ headers:
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - application/json
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic VEVTVDpURVNU
64
+ Content-Type:
65
+ - application/json
66
+ response:
67
+ status:
68
+ code: 200
69
+ message: OK
70
+ headers:
71
+ Cache-Control:
72
+ - no-store
73
+ Pragma:
74
+ - no-cache
75
+ Content-Type:
76
+ - application/json; charset=utf-8
77
+ X-Request-Version:
78
+ - 1.21.8
79
+ X-Request-Id:
80
+ - ea2891f24275b68c28a3f1323e948a70
81
+ X-Runtime:
82
+ - '3.727027'
83
+ Transfer-Encoding:
84
+ - chunked
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"successful":true,"response":{"action":{"proceed":false},"version":"1.0.2","enrolled":"U","acs_url":"","pareq":null,"pares":null,"xid":null,"eci":null,"cavv":null,"aav":null,"ucaf_collection_indicator":"0","authentication_path":"NOREDIRECT","authentication_result":null,"authentication_transaction_id":"PzazADhdWhVEa7ceE3N0","authentication_status_message":null,"card_bin":"512345","card_type_name":"MASTERCARD","commerce_indicator":"internet","proxy_pan":null,"currency":null,"request_id":"5762082109296464103008","request_token":"AxjzbwSTOFzz7ZXxSAZgAAoCUaf/NLj2Eg6cQkgoZNJMvRivpPBBCAAAXRO6","decision":"ACCEPT"},"errors":[],"test":true}'
88
+ http_version:
89
+ recorded_at: Fri, 13 Dec 2019 03:36:53 GMT
90
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,90 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - 3a0eaabac804a66c97d5c5eeb47fb930
35
+ X-Runtime:
36
+ - '0.276924'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"o5hotveijw8agdria5qy","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:36:53 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"card_token":"o5hotveijw8agdria5qy","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"f078a846-0341-4e44-94d7-17df9c73709c","customer":{"address_1":"23
52
+ Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
53
+ Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"0a63bc7821249574c95607ad9700daf7","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
54
+ (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
55
+ headers:
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - application/json
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic VEVTVDpURVNU
64
+ Content-Type:
65
+ - application/json
66
+ response:
67
+ status:
68
+ code: 200
69
+ message: OK
70
+ headers:
71
+ Cache-Control:
72
+ - no-store
73
+ Pragma:
74
+ - no-cache
75
+ Content-Type:
76
+ - application/json; charset=utf-8
77
+ X-Request-Version:
78
+ - 1.21.8
79
+ X-Request-Id:
80
+ - 37c8468cd9eab8df2ee66b8f71f350e8
81
+ X-Runtime:
82
+ - '3.868587'
83
+ Transfer-Encoding:
84
+ - chunked
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"successful":true,"response":{"action":{"proceed":false},"version":"1.0.2","enrolled":"U","acs_url":"","pareq":null,"pares":null,"xid":null,"eci":null,"cavv":null,"aav":null,"ucaf_collection_indicator":"0","authentication_path":"NOREDIRECT","authentication_result":null,"authentication_transaction_id":"IL3pnpf2SX6ooUnt2oQ0","authentication_status_message":null,"card_bin":"512345","card_type_name":"MASTERCARD","commerce_indicator":"internet","proxy_pan":null,"currency":null,"request_id":"5762082148186465103008","request_token":"AxjzbwSTOFz0EPS5+eygAAoCUaf/NLkYEg6cQkgoZNJMvRivpPBBCAAA/BJh","decision":"ACCEPT"},"errors":[],"test":true}'
88
+ http_version:
89
+ recorded_at: Fri, 13 Dec 2019 03:36:57 GMT
90
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,90 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - 4317188e0406cb61d617f50083f888ba
35
+ X-Runtime:
36
+ - '0.285764'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"fte6oxo0e3m7psaqt9y8","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:36:47 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"card_token":"INVALID","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"70e5d673-81f3-484e-a39d-2edcf5c5d972","customer":{"address_1":"23
52
+ Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
53
+ Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"065013652a629f68fe0c13b062664bde","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
54
+ (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
55
+ headers:
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - application/json
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic VEVTVDpURVNU
64
+ Content-Type:
65
+ - application/json
66
+ response:
67
+ status:
68
+ code: 422
69
+ message: Unprocessable Entity
70
+ headers:
71
+ Cache-Control:
72
+ - no-store
73
+ Pragma:
74
+ - no-cache
75
+ Content-Type:
76
+ - application/json; charset=utf-8
77
+ X-Request-Version:
78
+ - 1.21.8
79
+ X-Request-Id:
80
+ - 657e9ed464b17ddc7408080b39c08602
81
+ X-Runtime:
82
+ - '0.090252'
83
+ Transfer-Encoding:
84
+ - chunked
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"successful":false,"response":null,"errors":["Card not found"],"test":true}'
88
+ http_version:
89
+ recorded_at: Fri, 13 Dec 2019 03:36:47 GMT
90
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,87 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - 43ed2b2d9c154c7e0481c5c355b96cda
35
+ X-Runtime:
36
+ - '0.296102'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"8zwisd92mo3vj78h3h1g","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"card_token":"8zwisd92mo3vj78h3h1g","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{},"test":true}'
52
+ headers:
53
+ Accept-Encoding:
54
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
55
+ Accept:
56
+ - application/json
57
+ User-Agent:
58
+ - Ruby
59
+ Authorization:
60
+ - Basic VEVTVDpURVNU
61
+ Content-Type:
62
+ - application/json
63
+ response:
64
+ status:
65
+ code: 422
66
+ message: Unprocessable Entity
67
+ headers:
68
+ Cache-Control:
69
+ - no-store
70
+ Pragma:
71
+ - no-cache
72
+ Content-Type:
73
+ - application/json; charset=utf-8
74
+ X-Request-Version:
75
+ - 1.21.8
76
+ X-Request-Id:
77
+ - f20df6f1e626b1465afd5e7b4c7ed6d8
78
+ X-Runtime:
79
+ - '0.016688'
80
+ Transfer-Encoding:
81
+ - chunked
82
+ body:
83
+ encoding: UTF-8
84
+ string: '{"successful":false,"response":null,"errors":["Invalid input data"],"test":true}'
85
+ http_version:
86
+ recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
87
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,92 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - 9eaac5a0f47c58280c16fac2aeea8967
35
+ X-Runtime:
36
+ - '0.276772'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"zwjg665ok4olwtkgtxqa","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"card_token":"zwjg665ok4olwtkgtxqa","amount":100,"currency":"INVALID","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"b4e1785c-adfc-4f6d-977f-f2d174f11b04","customer":{"address_1":"23
52
+ Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
53
+ Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"8334c5a5686e00bf11616b7ae5cf9c62","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
54
+ (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
55
+ headers:
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - application/json
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic VEVTVDpURVNU
64
+ Content-Type:
65
+ - application/json
66
+ response:
67
+ status:
68
+ code: 422
69
+ message: Unprocessable Entity
70
+ headers:
71
+ Cache-Control:
72
+ - no-store
73
+ Pragma:
74
+ - no-cache
75
+ Content-Type:
76
+ - application/json; charset=utf-8
77
+ X-Request-Version:
78
+ - 1.21.8
79
+ X-Request-Id:
80
+ - 96ede94204ae13d0b0172ea816b6f602
81
+ X-Runtime:
82
+ - '0.029971'
83
+ Transfer-Encoding:
84
+ - chunked
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"successful":false,"response":null,"errors":["INVALID is not valid
88
+ for this merchant. Permitted currencies: USD, EUR, GBP, AUD, CAD, JPY, CHF,
89
+ HKD, NZD, SGD, and JPY"],"test":true}'
90
+ http_version:
91
+ recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
92
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,91 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - 4b4eafb91e6d2725974219a3c6ddb2a4
35
+ X-Runtime:
36
+ - '0.276697'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"1rtqbn4v5uhfgdq645wb","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
49
+ body:
50
+ encoding: UTF-8
51
+ string: '{"card_token":"1rtqbn4v5uhfgdq645wb","amount":"INVALID","currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"cfddc4c5-7c2c-4b0d-8e6c-92a0b2f585a8","customer":{"address_1":"23
52
+ Smith Road","address_2":"North Shore","city":"Canberra","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","passport_number":"X1234567890","passport_country":"036","account_changed_at":"20191210","account_created_at":"20191210","account_password_changed_at":"20191210"},"shipping_address":{"address_1":"23
53
+ Smith Road","address_2":"North Shore","city":"Sydney","country":"AU","state":"NSW","email":"test@test.com","first_name":"James","last_name":"Smith","phone_number":"0444555666","post_code":"2000","method":"pickup","destination_code":"01"},"custom":{"transaction_mode":"mobile","reference_id":"dec94e0b86ce6123064ffb50f4ca33ef","merchant_name":"TEST","merchant_new_customer":true,"preorder":1,"http_accept":"text/html","http_user_agent":"Mozilla/5.0
54
+ (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0","recurring_end_date":"20201201","recurring_frequency":3,"recurring_original_purchase_date":"2019120112:00:00"},"items":[{"unit_price":23.3,"product_description":"Widgets","product_name":"Watch","quantity":1,"product_sku":"9999","passenger_first_name":"John","passenger_last_name":"Smith"}],"airline_data":{"legs":[{"carrier_code":"code","departure_date":"20221012","destination":"SYD","originating_airport_code":"MEL"}],"number_of_passengers":2,"passengers":[{"first_name":"John","last_name":"Smith"},{"first_name":"Megan","last_name":"Doe"}]}},"test":true}'
55
+ headers:
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - application/json
60
+ User-Agent:
61
+ - Ruby
62
+ Authorization:
63
+ - Basic VEVTVDpURVNU
64
+ Content-Type:
65
+ - application/json
66
+ response:
67
+ status:
68
+ code: 422
69
+ message: Unprocessable Entity
70
+ headers:
71
+ Cache-Control:
72
+ - no-store
73
+ Pragma:
74
+ - no-cache
75
+ Content-Type:
76
+ - application/json; charset=utf-8
77
+ X-Request-Version:
78
+ - 1.21.8
79
+ X-Request-Id:
80
+ - 27858cda4cc746888b962aeb5d264bb2
81
+ X-Runtime:
82
+ - '0.079520'
83
+ Transfer-Encoding:
84
+ - chunked
85
+ body:
86
+ encoding: UTF-8
87
+ string: '{"successful":false,"response":null,"errors":["3DS authenticate request
88
+ failed: amount must be filled"],"test":true}'
89
+ http_version:
90
+ recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
91
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/credit_cards
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"card_holder":"Matthew Savage","card_number":"5123456789012346","card_expiry":"02/2030","cvv":123,"test":true}'
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Authorization:
17
+ - Basic VEVTVDpURVNU
18
+ Content-Type:
19
+ - application/json
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-store
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Request-Version:
32
+ - 1.21.8
33
+ X-Request-Id:
34
+ - f6dc839b7c8bdbff516d4458cf260431
35
+ X-Runtime:
36
+ - '0.275701'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"sa0vydbycjer8isyh7ws","card_holder":"Matthew
42
+ Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
43
+ Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
44
+ http_version:
45
+ recorded_at: Fri, 13 Dec 2019 03:37:01 GMT
46
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,47 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate/decode_session?test=true&token=INVALID%20TOKEN
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/json
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - gateway.sandbox.fatzebra.com.au
18
+ Authorization:
19
+ - Basic VEVTVDpURVNU
20
+ Content-Type:
21
+ - application/json
22
+ response:
23
+ status:
24
+ code: 422
25
+ message: Unprocessable Entity
26
+ headers:
27
+ Cache-Control:
28
+ - no-store
29
+ Pragma:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ X-Request-Version:
34
+ - 1.21.8
35
+ X-Request-Id:
36
+ - a32509c0289cec10954d4d581bfeb46f
37
+ X-Runtime:
38
+ - '0.039686'
39
+ Transfer-Encoding:
40
+ - chunked
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"successful":false,"response":null,"errors":["Decoding JWT failed:
44
+ The token is invalid"],"test":true}'
45
+ http_version:
46
+ recorded_at: Fri, 13 Dec 2019 00:52:54 GMT
47
+ recorded_with: VCR 3.0.3