fat_zebra 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +1 -0
- data/README.md +3 -3
- data/fat_zebra.gemspec +3 -3
- data/lib/fat_zebra.rb +7 -0
- data/lib/fat_zebra/card.rb +1 -0
- data/lib/fat_zebra/paypal/authorization.rb +49 -0
- data/lib/fat_zebra/paypal/billing_agreement.rb +56 -0
- data/lib/fat_zebra/paypal/capture.rb +36 -0
- data/lib/fat_zebra/paypal/order.rb +22 -0
- data/lib/fat_zebra/paypal/refund.rb +22 -0
- data/lib/fat_zebra/version.rb +1 -1
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/validations/1_3_5_1.yml +46 -0
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_challenge_response/1_3_3_1.yml +12 -13
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_challenge_response/1_3_3_2.yml +12 -13
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_1.yml +12 -13
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_2.yml +12 -13
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_1.yml +12 -13
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_2.yml +8 -8
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_3.yml +14 -14
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_invalid_input/1_3_1_4.yml +13 -14
- data/spec/cassettes/FatZebra_Authenticate/_authenticate/{validations → with_type_validation}/1_3_4_1.yml +4 -4
- data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_invalid/returns_error_when_invalid_token.yml +5 -5
- data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_valid/decodes_JWT.yml +10 -10
- data/spec/cassettes/FatZebra_Authenticate/_session/returns_JWT_with_given_params.yml +5 -5
- data/spec/cassettes/FatZebra_Authenticate/_session/{returns_JWT_with_no_params.yml → returns_JWT_with_no_amount.yml} +5 -5
- data/spec/cassettes/FatZebra_Authenticate/_session/returns_error_when_amount_is_invalid.yml +5 -5
- data/spec/cassettes/FatZebra_Authenticate/_session/returns_error_when_currency_is_invalid.yml +46 -0
- data/spec/cassettes/FatZebra_Card/_find/1_3_1.yml +111 -0
- data/spec/cassettes/FatZebra_Card/_find/1_3_2.yml +111 -0
- data/spec/cassettes/FatZebra_Paypal_Authorization/_capture/returns_a_new_capture_record.yml +45 -0
- data/spec/cassettes/FatZebra_Paypal_Authorization/_find/when_found/returns_authorization.yml +46 -0
- data/spec/cassettes/FatZebra_Paypal_Authorization/_search/with_date_filter/returns_records_created_after_start_date.yml +46 -0
- data/spec/cassettes/FatZebra_Paypal_Authorization/_void/returns_a_voided_capture_record.yml +44 -0
- data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_charge/Valid_payload/returns_a_new_order_record.yml +48 -0
- data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_find/when_found/returns_billing_agreement.yml +48 -0
- data/spec/cassettes/FatZebra_Paypal_BillingAgreement/_search/with_date_filter/returns_records_created_after_start_date.yml +48 -0
- data/spec/cassettes/FatZebra_Paypal_Capture/_find/when_found/returns_capture.yml +47 -0
- data/spec/cassettes/FatZebra_Paypal_Capture/_refund/returns_a_new_refund_record.yml +45 -0
- data/spec/cassettes/FatZebra_Paypal_Capture/_search/with_date_filter/returns_records_created_after_start_date.yml +49 -0
- data/spec/cassettes/FatZebra_Paypal_Order/_find/when_found/returns_order.yml +48 -0
- data/spec/cassettes/FatZebra_Paypal_Order/_search/with_date_filter/returns_orders_created_after_start_date.yml +55 -0
- data/spec/cassettes/FatZebra_Paypal_Refund/_find/when_found/returns_refund.yml +47 -0
- data/spec/cassettes/FatZebra_Paypal_Refund/_search/with_date_filter/returns_all_refund_records_created_after_start_date.yml +50 -0
- data/spec/lib/fat_zebra/authenticate_spec.rb +88 -45
- data/spec/lib/fat_zebra/card_spec.rb +8 -0
- data/spec/lib/fat_zebra/paypal/authorization_spec.rb +79 -0
- data/spec/lib/fat_zebra/paypal/billing_agreement_spec.rb +62 -0
- data/spec/lib/fat_zebra/paypal/capture_spec.rb +60 -0
- data/spec/lib/fat_zebra/paypal/order_spec.rb +35 -0
- data/spec/lib/fat_zebra/paypal/refund_spec.rb +36 -0
- data/spec/spec_helper.rb +0 -1
- data/spec/support/payloads.rb +129 -41
- metadata +39 -12
- data/spec/cassettes/FatZebra_Authenticate/_session/returns_JWT_with_some_params.yml +0 -44
data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_1.yml
CHANGED
@@ -31,28 +31,27 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- 5eec467855ac8c00a5aea3a3188a4d7b
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.270447'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"w85zqhss15f3kza55c9p","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:36:49 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
48
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"card_token":"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
ADDRESS","billing_address3":"SOME ADDRESS","authentication_indicator":"01","product_code":"PHY"},"recurring":{"installment":2,"purchase_date":"20201101153752","recurring_end":"20201101","recurring_frequency":31}},"test":true}'
|
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}'
|
56
55
|
headers:
|
57
56
|
Accept-Encoding:
|
58
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -78,14 +77,14 @@ http_interactions:
|
|
78
77
|
X-Request-Version:
|
79
78
|
- 1.21.8
|
80
79
|
X-Request-Id:
|
81
|
-
-
|
80
|
+
- ea2891f24275b68c28a3f1323e948a70
|
82
81
|
X-Runtime:
|
83
|
-
- '
|
82
|
+
- '3.727027'
|
84
83
|
Transfer-Encoding:
|
85
84
|
- chunked
|
86
85
|
body:
|
87
86
|
encoding: UTF-8
|
88
|
-
string: '{"successful":true,"response":{"
|
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}'
|
89
88
|
http_version:
|
90
|
-
recorded_at: Fri,
|
89
|
+
recorded_at: Fri, 13 Dec 2019 03:36:53 GMT
|
91
90
|
recorded_with: VCR 3.0.3
|
data/spec/cassettes/FatZebra_Authenticate/_authenticate/with_frictionless_response/1_3_2_2.yml
CHANGED
@@ -31,28 +31,27 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- 3a0eaabac804a66c97d5c5eeb47fb930
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.276924'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"o5hotveijw8agdria5qy","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:36:53 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
48
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"card_token":"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
ADDRESS","billing_address3":"SOME ADDRESS","authentication_indicator":"01","product_code":"PHY"},"recurring":{"installment":2,"purchase_date":"20201101153754","recurring_end":"20201101","recurring_frequency":31}},"test":true}'
|
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}'
|
56
55
|
headers:
|
57
56
|
Accept-Encoding:
|
58
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -78,14 +77,14 @@ http_interactions:
|
|
78
77
|
X-Request-Version:
|
79
78
|
- 1.21.8
|
80
79
|
X-Request-Id:
|
81
|
-
-
|
80
|
+
- 37c8468cd9eab8df2ee66b8f71f350e8
|
82
81
|
X-Runtime:
|
83
|
-
- '
|
82
|
+
- '3.868587'
|
84
83
|
Transfer-Encoding:
|
85
84
|
- chunked
|
86
85
|
body:
|
87
86
|
encoding: UTF-8
|
88
|
-
string: '{"successful":true,"response":{"
|
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}'
|
89
88
|
http_version:
|
90
|
-
recorded_at: Fri,
|
89
|
+
recorded_at: Fri, 13 Dec 2019 03:36:57 GMT
|
91
90
|
recorded_with: VCR 3.0.3
|
@@ -31,28 +31,27 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- 4317188e0406cb61d617f50083f888ba
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.285764'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"fte6oxo0e3m7psaqt9y8","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:36:47 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
48
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"card_token":"INVALID","
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
ADDRESS","billing_address3":"SOME ADDRESS","authentication_indicator":"01","product_code":"PHY"},"recurring":{"installment":2,"purchase_date":"20201101153750","recurring_end":"20201101","recurring_frequency":31}},"test":true}'
|
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}'
|
56
55
|
headers:
|
57
56
|
Accept-Encoding:
|
58
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -78,14 +77,14 @@ http_interactions:
|
|
78
77
|
X-Request-Version:
|
79
78
|
- 1.21.8
|
80
79
|
X-Request-Id:
|
81
|
-
-
|
80
|
+
- 657e9ed464b17ddc7408080b39c08602
|
82
81
|
X-Runtime:
|
83
|
-
- '0.
|
82
|
+
- '0.090252'
|
84
83
|
Transfer-Encoding:
|
85
84
|
- chunked
|
86
85
|
body:
|
87
86
|
encoding: UTF-8
|
88
|
-
string: '{"successful":false,"response":null,"errors":"Card not found","test":true}'
|
87
|
+
string: '{"successful":false,"response":null,"errors":["Card not found"],"test":true}'
|
89
88
|
http_version:
|
90
|
-
recorded_at: Fri,
|
89
|
+
recorded_at: Fri, 13 Dec 2019 03:36:47 GMT
|
91
90
|
recorded_with: VCR 3.0.3
|
@@ -31,24 +31,24 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- 43ed2b2d9c154c7e0481c5c355b96cda
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.296102'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"8zwisd92mo3vj78h3h1g","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
48
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"card_token":"
|
51
|
+
string: '{"card_token":"8zwisd92mo3vj78h3h1g","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{},"test":true}'
|
52
52
|
headers:
|
53
53
|
Accept-Encoding:
|
54
54
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -74,14 +74,14 @@ http_interactions:
|
|
74
74
|
X-Request-Version:
|
75
75
|
- 1.21.8
|
76
76
|
X-Request-Id:
|
77
|
-
-
|
77
|
+
- f20df6f1e626b1465afd5e7b4c7ed6d8
|
78
78
|
X-Runtime:
|
79
|
-
- '0.
|
79
|
+
- '0.016688'
|
80
80
|
Transfer-Encoding:
|
81
81
|
- chunked
|
82
82
|
body:
|
83
83
|
encoding: UTF-8
|
84
84
|
string: '{"successful":false,"response":null,"errors":["Invalid input data"],"test":true}'
|
85
85
|
http_version:
|
86
|
-
recorded_at: Fri,
|
86
|
+
recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
|
87
87
|
recorded_with: VCR 3.0.3
|
@@ -31,28 +31,27 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- 9eaac5a0f47c58280c16fac2aeea8967
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.276772'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"zwjg665ok4olwtkgtxqa","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
48
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"card_token":"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
ADDRESS","billing_address3":"SOME ADDRESS","authentication_indicator":"01","product_code":"PHY"},"recurring":{"installment":2,"purchase_date":"20201101153751","recurring_end":"20201101","recurring_frequency":31}},"test":true}'
|
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}'
|
56
55
|
headers:
|
57
56
|
Accept-Encoding:
|
58
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -78,15 +77,16 @@ http_interactions:
|
|
78
77
|
X-Request-Version:
|
79
78
|
- 1.21.8
|
80
79
|
X-Request-Id:
|
81
|
-
-
|
80
|
+
- 96ede94204ae13d0b0172ea816b6f602
|
82
81
|
X-Runtime:
|
83
|
-
- '0.
|
82
|
+
- '0.029971'
|
84
83
|
Transfer-Encoding:
|
85
84
|
- chunked
|
86
85
|
body:
|
87
86
|
encoding: UTF-8
|
88
|
-
string: '{"successful":false,"response":null,"errors":"
|
89
|
-
|
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
90
|
http_version:
|
91
|
-
recorded_at: Fri,
|
91
|
+
recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
|
92
92
|
recorded_with: VCR 3.0.3
|
@@ -31,28 +31,27 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- 4b4eafb91e6d2725974219a3c6ddb2a4
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.276697'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"1rtqbn4v5uhfgdq645wb","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
|
46
46
|
- request:
|
47
47
|
method: post
|
48
48
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate
|
49
49
|
body:
|
50
50
|
encoding: UTF-8
|
51
|
-
string: '{"card_token":"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
ADDRESS","billing_address3":"SOME ADDRESS","authentication_indicator":"01","product_code":"PHY"},"recurring":{"installment":2,"purchase_date":"20201101153752","recurring_end":"20201101","recurring_frequency":31}},"test":true}'
|
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}'
|
56
55
|
headers:
|
57
56
|
Accept-Encoding:
|
58
57
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -78,15 +77,15 @@ http_interactions:
|
|
78
77
|
X-Request-Version:
|
79
78
|
- 1.21.8
|
80
79
|
X-Request-Id:
|
81
|
-
-
|
80
|
+
- 27858cda4cc746888b962aeb5d264bb2
|
82
81
|
X-Runtime:
|
83
|
-
- '0.
|
82
|
+
- '0.079520'
|
84
83
|
Transfer-Encoding:
|
85
84
|
- chunked
|
86
85
|
body:
|
87
86
|
encoding: UTF-8
|
88
|
-
string: '{"successful":false,"response":null,"errors":"3DS
|
89
|
-
failed: amount must be
|
87
|
+
string: '{"successful":false,"response":null,"errors":["3DS authenticate request
|
88
|
+
failed: amount must be filled"],"test":true}'
|
90
89
|
http_version:
|
91
|
-
recorded_at: Fri,
|
90
|
+
recorded_at: Fri, 13 Dec 2019 03:36:48 GMT
|
92
91
|
recorded_with: VCR 3.0.3
|
@@ -31,16 +31,16 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- f6dc839b7c8bdbff516d4458cf260431
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.275701'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"token":"
|
41
|
+
string: '{"successful":true,"response":{"token":"sa0vydbycjer8isyh7ws","card_holder":"Matthew
|
42
42
|
Savage","card_number":"512345XXXXXX2346","card_expiry":"2030-02-28","card_type":"MasterCard","card_category":"Credit","card_subcategory":"Standard","card_issuer":"Banco
|
43
43
|
Del Pichincha, C.A.","card_country":"Ecuador","authorized":true,"transaction_count":0,"alias":null},"errors":[],"test":true}'
|
44
44
|
http_version:
|
45
|
-
recorded_at: Fri,
|
45
|
+
recorded_at: Fri, 13 Dec 2019 03:37:01 GMT
|
46
46
|
recorded_with: VCR 3.0.3
|
@@ -33,15 +33,15 @@ http_interactions:
|
|
33
33
|
X-Request-Version:
|
34
34
|
- 1.21.8
|
35
35
|
X-Request-Id:
|
36
|
-
-
|
36
|
+
- a32509c0289cec10954d4d581bfeb46f
|
37
37
|
X-Runtime:
|
38
|
-
- '0.
|
38
|
+
- '0.039686'
|
39
39
|
Transfer-Encoding:
|
40
40
|
- chunked
|
41
41
|
body:
|
42
42
|
encoding: UTF-8
|
43
|
-
string: '{"successful":false,"response":null,"errors":"Decoding JWT failed:
|
44
|
-
The token is invalid","test":true}'
|
43
|
+
string: '{"successful":false,"response":null,"errors":["Decoding JWT failed:
|
44
|
+
The token is invalid"],"test":true}'
|
45
45
|
http_version:
|
46
|
-
recorded_at:
|
46
|
+
recorded_at: Fri, 13 Dec 2019 00:52:54 GMT
|
47
47
|
recorded_with: VCR 3.0.3
|
data/spec/cassettes/FatZebra_Authenticate/_decode_session/when_token_is_valid/decodes_JWT.yml
CHANGED
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate/session
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"test":true}'
|
8
|
+
string: '{"currency":"AUD","amount":100,"test":true}'
|
9
9
|
headers:
|
10
10
|
Accept-Encoding:
|
11
11
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -31,19 +31,19 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- f4d377e827607ded10629269ce56e58f
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.048153'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"jwt":"eyJhbGciOiJIUzI1NiJ9.
|
41
|
+
string: '{"successful":true,"response":{"jwt":"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYyMTI3NzMsImlhdCI6MTU3NjE5ODM3MywiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiYTRmYjk0MmQtZmYyNS00YmE1LTg0OGQtZWY4ZTk5N2E4OWQyIiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.XnYWuD5aZ3G5J5es3H8TBJkqAwR8ZYUMbggbIc4mguc"},"errors":[],"test":true}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Fri, 13 Dec 2019 00:52:53 GMT
|
44
44
|
- request:
|
45
45
|
method: get
|
46
|
-
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate/decode_session?test=true&token=eyJhbGciOiJIUzI1NiJ9.
|
46
|
+
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate/decode_session?test=true&token=eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYyMTI3NzMsImlhdCI6MTU3NjE5ODM3MywiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiYTRmYjk0MmQtZmYyNS00YmE1LTg0OGQtZWY4ZTk5N2E4OWQyIiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.XnYWuD5aZ3G5J5es3H8TBJkqAwR8ZYUMbggbIc4mguc
|
47
47
|
body:
|
48
48
|
encoding: US-ASCII
|
49
49
|
string: ''
|
@@ -74,14 +74,14 @@ http_interactions:
|
|
74
74
|
X-Request-Version:
|
75
75
|
- 1.21.8
|
76
76
|
X-Request-Id:
|
77
|
-
-
|
77
|
+
- ccb35eb7239627765e7be3908aa68345
|
78
78
|
X-Runtime:
|
79
|
-
- '0.
|
79
|
+
- '0.029515'
|
80
80
|
Transfer-Encoding:
|
81
81
|
- chunked
|
82
82
|
body:
|
83
83
|
encoding: UTF-8
|
84
|
-
string: '{"successful":true,"response":{"
|
84
|
+
string: '{"successful":true,"response":{"processor_transaction_id":null,"consumer_session_id":null,"reference_id":null,"type":null,"action_code":null,"error_number":null,"error_description":null},"errors":[],"test":true}'
|
85
85
|
http_version:
|
86
|
-
recorded_at:
|
86
|
+
recorded_at: Fri, 13 Dec 2019 00:52:53 GMT
|
87
87
|
recorded_with: VCR 3.0.3
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://gateway.sandbox.fatzebra.com.au/v1.0/authenticate/session
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string: '{"
|
8
|
+
string: '{"currency":"AUD","amount":100,"test":true}'
|
9
9
|
headers:
|
10
10
|
Accept-Encoding:
|
11
11
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -31,14 +31,14 @@ http_interactions:
|
|
31
31
|
X-Request-Version:
|
32
32
|
- 1.21.8
|
33
33
|
X-Request-Id:
|
34
|
-
-
|
34
|
+
- ce903d72b1cd571ea126ba6192706cfc
|
35
35
|
X-Runtime:
|
36
|
-
- '0.
|
36
|
+
- '0.030447'
|
37
37
|
Transfer-Encoding:
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"successful":true,"response":{"jwt":"eyJhbGciOiJIUzI1NiJ9.
|
41
|
+
string: '{"successful":true,"response":{"jwt":"eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NzYyMTI3NzYsImlhdCI6MTU3NjE5ODM3NiwiaXNzIjoiNWRjM2VhMzVhZmE4MGQyZWEwZWUxMGU3IiwianRpIjoiN2MyOGUxNjctMTA4Yy00Y2M1LWI5YzAtZTExYWUxNDE4MzcyIiwiT3JnVW5pdElkIjoiNWRiMTVhMzQwMDViOTMwZmM0MGM4OWVlIiwiT2JqZWN0aWZ5UGF5bG9hZCI6dHJ1ZSwiUGF5bG9hZCI6eyJPcmRlckRldGFpbHMiOnsiQ3VycmVuY3lDb2RlIjoiMDM2IiwiQW1vdW50IjoiMTAwIn19fQ.JKEs6y5ntnUoHlM-f-2tJAthRpuXhrB3DMsPzdDDYHA"},"errors":[],"test":true}'
|
42
42
|
http_version:
|
43
|
-
recorded_at:
|
43
|
+
recorded_at: Fri, 13 Dec 2019 00:52:56 GMT
|
44
44
|
recorded_with: VCR 3.0.3
|