fat_zebra_multi 3.2.0.1 → 3.2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8cc64078a0d4550e82e685fd5f4ff5a863050d0cf0def2fc44685f02ed89328
4
- data.tar.gz: 496cc0182bcac8d5bbc07ff030ab15b0332acad2d912a4ce11fce1eefebdb2a6
3
+ metadata.gz: 522930346837498084e067e4755cd18ab04745fa68cdcef28080e0b738eead32
4
+ data.tar.gz: d373681019bdbf1421aeb622b7b699558d66a4d5c2dc4808660886bc625410d7
5
5
  SHA512:
6
- metadata.gz: d072ffcf46a12cd7755953e6da610564e399d6dde9cee3c6bd4c5ec8321b139bfa5fada2656229a9523eaaa964e2905eae0ee1397599ce63f2a41863396f1834
7
- data.tar.gz: 99a13904c3238ff24a0bdc495129e4894c3550ee85fff8dfb07ec79a98b802cbe5b187e6bb6782e868e5cfd303e98aa2f3ab914ebd424be412c18983bdcdc965
6
+ metadata.gz: d22fc4507cadacad9b1569c6f7c83843b12745fe608a1c2d8a587ea72d5a3a44b4d379707f8334b479b2bc2acc0c6731400c35c71bf0e83f369aefbfd2585fe0
7
+ data.tar.gz: 0b2f7466a6b856a3e6fa357e55dda2f62d73d37c38eee8fa5159939b2c5956bf4c75748fc492e227839c31148f504c8ba07cd5be9f67e13b54633e361df3ce28
data/.gitignore CHANGED
@@ -4,3 +4,5 @@ Gemfile.lock
4
4
  pkg/*
5
5
  .yardoc
6
6
  doc/
7
+ .byebug_history
8
+ .ruby-version
data/.travis.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  cache: bundler
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3
5
- - 2.4
6
- - 2.5
7
4
  - 2.6
5
+ - 2.7
6
+ - 3.0
7
+ - 3.1
8
8
  script:
9
9
  - bundle exec rspec spec
10
10
  - bundle exec rubocop
data/README.md CHANGED
@@ -3,11 +3,12 @@ Ruby API Library for Fat Zebra
3
3
 
4
4
  [![Build Status](https://travis-ci.org/supporterhub/fat-zebra-api-client.svg?branch=master)](https://travis-ci.org/supporterhub/fat-zebra-api-client)
5
5
 
6
- A Ruby client for the [Fat Zebra](https://www.fatzebra.com.au) Online Payment Gateway (for Australian Merchants)
6
+ Release 3.2.0 for API version 1.0
7
+ A Ruby client for the [Fat Zebra](https://www.fatzebra.com) Online Payment Gateway
7
8
 
8
9
  This is an unofficial fork of the Fat Zebra API client. This version has been patched to allow multiple accounts to be used simultaneously.
9
10
 
10
- Version 3.1.0.x of this gem aims to be a drop-in replacement for version 3.1.0 of the official gem.
11
+ Version 3.2.3.x of this gem aims to be a drop-in replacement for version 3.2.3 of the official gem.
11
12
 
12
13
  It aims to maintain parity with the [official Fat Zebra API client](https://github.com/fatzebra/Ruby-Library).
13
14
 
@@ -93,11 +94,11 @@ end
93
94
  Documentation
94
95
  -------------
95
96
 
96
- Full API reference can be found at http://docs.fatzebra.com.au
97
+ Full API reference can be found at http://docs.fatzebra.com
97
98
 
98
99
  Support
99
100
  -------
100
- If you have any issue with the Fat Zebra Ruby Client please contact us at support@fatzebra.com.au and we will be more then happy to help out. Alternatively you may raise an issue in github.
101
+ If you have any issue with the Fat Zebra Ruby Client please contact us at support@fatzebra.com and we will be more then happy to help out. Alternatively you may raise an issue in github.
101
102
 
102
103
  Pull Requests
103
104
  -------------
@@ -6,8 +6,8 @@ require 'fat_zebra/version'
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'fat_zebra_multi'
8
8
  s.version = FatZebra::VERSION
9
- s.authors = ['Matthew Savage', 'Aidan Samuel']
10
- s.email = ['matt@amasses.net', 'aidan.samuel@supporterhub.com']
9
+ s.authors = ['Fat Zebra', 'Aidan Samuel']
10
+ s.email = ['support@fatzebra.com', 'aidan.samuel@supporterhub.com']
11
11
  s.homepage = ''
12
12
  s.summary = 'Unofficial fork of the Fat Zebra API client - integrate your Ruby app with Fat Zebra'
13
13
  s.description = 'Unofficial fork. Integrate with the Fat Zebra internet payment gateway (www.fatzebra.com.au), including purchase, refund, auth, capture and recurring billing functionality.'
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -- {spec}/*`.split("\n")
17
17
  s.require_paths = %w[lib]
18
18
 
19
+ s.add_development_dependency 'byebug'
19
20
  s.add_development_dependency 'pry'
20
21
  s.add_development_dependency 'rake'
21
22
  s.add_development_dependency 'rspec', '~> 3.6'
@@ -23,5 +24,5 @@ Gem::Specification.new do |s|
23
24
  s.add_development_dependency 'vcr', '~> 3.0'
24
25
  s.add_development_dependency 'webmock', '~> 3.0'
25
26
 
26
- s.required_ruby_version = '~> 2.3'
27
+ s.required_ruby_version = '>= 2.3.0'
27
28
  end
@@ -0,0 +1,64 @@
1
+ module FatZebra
2
+ ##
3
+ # == FatZebra \Authenticate
4
+ #
5
+ # Manage 3DS2/SCA authentication for the API
6
+ #
7
+ # * session
8
+ # * authenticate
9
+ # * decode_session
10
+ #
11
+ class Authenticate < APIResource
12
+ @resource_name = 'authenticate'
13
+
14
+ validates :card_token, required: true, on: :authenticate
15
+ validates :sca, required: true, on: :authenticate
16
+ validates :token, required: true, on: :decode_session
17
+
18
+ class << self
19
+
20
+ ##
21
+ # Returns a JWT token for the 3DS authentication process
22
+ #
23
+ # @param [Hash] params
24
+ # @param [Hash] options for the request, and configurations (Optional)
25
+ #
26
+ # @return [FatZebra::Authenticate]
27
+ def session(params = {}, options = {})
28
+ valid!(params, :session) if respond_to?(:valid!)
29
+
30
+ response = request(:post, "#{resource_path}/session", params, options)
31
+ initialize_from(response)
32
+ end
33
+
34
+ ##
35
+ # Decodes a JWT token for the 3DS authentication process
36
+ #
37
+ # @param [Hash] params
38
+ # @param [Hash] options for the request, and configurations (Optional)
39
+ #
40
+ # @return [FatZebra::Authenticate]
41
+ def decode_session(params = {}, options = {})
42
+ valid!(params, :decode_session) if respond_to?(:valid!)
43
+
44
+ response = request(:get, "#{resource_path}/decode_session", params, options)
45
+ initialize_from(response)
46
+ end
47
+
48
+ ##
49
+ # Authenticates a 3ds request
50
+ #
51
+ # @param [Hash] params
52
+ # @param [Hash] options for the request, and configurations (Optional)
53
+ #
54
+ # @return [FatZebra::Authenticate]
55
+ def authenticate(params = {}, options = {})
56
+ valid!(params, :authenticate) if respond_to?(:valid!)
57
+
58
+ response = request(:post, resource_path, params, options)
59
+ initialize_from(response)
60
+ end
61
+ end
62
+
63
+ end
64
+ end
@@ -9,6 +9,7 @@ module FatZebra
9
9
  class Card < APIResource
10
10
  @resource_name = 'credit_cards'
11
11
 
12
+ include FatZebra::APIOperation::Find
12
13
  include FatZebra::APIOperation::Save
13
14
 
14
15
  validates :card_holder, required: { unless: %i[wallet] }, on: :create
@@ -0,0 +1,49 @@
1
+ module FatZebra
2
+ ##
3
+ # == FatZebra \Paypal::Authorization
4
+ #
5
+ # Manage PayPal Authorizations
6
+ #
7
+ # * search
8
+ # * find
9
+ # * capture
10
+ # * void
11
+ #
12
+ module Paypal
13
+ class Authorization < APIResource
14
+ include FatZebra::APIOperation::Find
15
+ include FatZebra::APIOperation::Search
16
+
17
+ class << self
18
+ def base_path
19
+ super + '/paypal/'
20
+ end
21
+
22
+ ##
23
+ # Capture a PayPal Authorization
24
+ #
25
+ # @param [String] Authorization id
26
+ # @param [Hash] params (amount, final_capture, note_to_payer)
27
+ # @param [Hash] options for the request, and configurations (Optional)
28
+ #
29
+ # @return [FatZebra::Paypal::Capture]
30
+ def capture(id, params = {}, options = {})
31
+ response = request(:post, resource_path("authorizations/#{id}/capture"), params, options)
32
+ FatZebra::Paypal::Capture.initialize_from(response)
33
+ end
34
+
35
+ ##
36
+ # Void a PayPal Authorization
37
+ #
38
+ # @param [String] Authorization id
39
+ # @param [Hash] options for the request, and configurations (Optional)
40
+ #
41
+ # @return [FatZebra::Authorization]
42
+ def void(id, options = {})
43
+ response = request(:post, resource_path("authorizations/#{id}/void"), {}, options)
44
+ initialize_from(response)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,56 @@
1
+ module FatZebra
2
+ ##
3
+ # == FatZebra \Paypal::BillingAgreement
4
+ #
5
+ # Manage PayPal Billing Agreements
6
+ #
7
+ # * search
8
+ # * find
9
+ # * charge
10
+ # * cancel
11
+ #
12
+ module Paypal
13
+ class BillingAgreement < APIResource
14
+ include FatZebra::APIOperation::Find
15
+ include FatZebra::APIOperation::Search
16
+
17
+ validates :purchases, required: true, on: :charge
18
+ validates :amount, required: true, on: :charge
19
+ validates :currency, required: true, on: :charge
20
+ validates :reference, required: true, on: :charge
21
+
22
+ class << self
23
+ def base_path
24
+ super + '/paypal/'
25
+ end
26
+
27
+ ##
28
+ # Charge a PayPal Billing Agreement
29
+ #
30
+ # @param [String] Billing Agreement id
31
+ # @param [Hash] params (currency, reference, amount, purchases)
32
+ # @param [Hash] options for the request, and configurations (Optional)
33
+ #
34
+ # @return [FatZebra::Paypal::Order]
35
+ def charge(id, params, options = {})
36
+ valid!(params, :charge) if respond_to?(:valid!)
37
+
38
+ response = request(:post, resource_path("billing_agreements/#{id}/charge"), params, options)
39
+ FatZebra::Paypal::Order.initialize_from(response)
40
+ end
41
+
42
+ ##
43
+ # Cancel a PayPal Billing Agreement
44
+ #
45
+ # @param [String] Billing Agreement id
46
+ # @param [Hash] options for the request, and configurations (Optional)
47
+ #
48
+ # @return [FatZebra::BillingAgreement]
49
+ def cancel(id, options = {})
50
+ response = request(:post, resource_path("billing_agreements/#{id}/cancel"), {}, options)
51
+ initialize_from(response)
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,36 @@
1
+ module FatZebra
2
+ ##
3
+ # == FatZebra \Paypal::Capture
4
+ #
5
+ # Manage PayPal Captures
6
+ #
7
+ # * search
8
+ # * find
9
+ # * refund
10
+ #
11
+ module Paypal
12
+ class Capture < APIResource
13
+ include FatZebra::APIOperation::Find
14
+ include FatZebra::APIOperation::Search
15
+
16
+ class << self
17
+ def base_path
18
+ super + '/paypal/'
19
+ end
20
+
21
+ ##
22
+ # Refund a PayPal Capture
23
+ #
24
+ # @param [String] Capture id
25
+ # @param [Hash] params (amount, note_to_payer)
26
+ # @param [Hash] options for the request, and configurations (Optional)
27
+ #
28
+ # @return [FatZebra::Paypal::Refund]
29
+ def refund(id, params = {}, options = {})
30
+ response = request(:post, resource_path("captures/#{id}/refund"), params, options)
31
+ FatZebra::Paypal::Refund.initialize_from(response)
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,22 @@
1
+ module FatZebra
2
+ ##
3
+ # == FatZebra \Paypal::Order
4
+ #
5
+ # Manage PayPal Orders
6
+ #
7
+ # * search
8
+ # * find
9
+ #
10
+ module Paypal
11
+ class Order < APIResource
12
+ include FatZebra::APIOperation::Find
13
+ include FatZebra::APIOperation::Search
14
+
15
+ class << self
16
+ def base_path
17
+ super + '/paypal/'
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ module FatZebra
2
+ ##
3
+ # == FatZebra \Paypal::Refund
4
+ #
5
+ # Manage PayPal Refunds
6
+ #
7
+ # * search
8
+ # * find
9
+ #
10
+ module Paypal
11
+ class Refund < APIResource
12
+ include FatZebra::APIOperation::Find
13
+ include FatZebra::APIOperation::Search
14
+
15
+ class << self
16
+ def base_path
17
+ super + '/paypal/'
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -6,7 +6,7 @@ module FatZebra
6
6
  REGEXP_HTTP = %r{http[s]?\:\/\/}
7
7
 
8
8
  def cleanup_host(uri)
9
- uri.gsub(REGEXP_HTTP, '')
9
+ uri.to_s.gsub(REGEXP_HTTP, '')
10
10
  end
11
11
 
12
12
  ##
@@ -1,3 +1,3 @@
1
1
  module FatZebra
2
- VERSION = '3.2.0.1'.freeze
2
+ VERSION = '3.2.3.2'.freeze
3
3
  end
data/lib/fat_zebra.rb CHANGED
@@ -28,7 +28,7 @@ require 'fat_zebra/api_operation/void'
28
28
  require 'fat_zebra/purchase'
29
29
  require 'fat_zebra/information'
30
30
  require 'fat_zebra/card'
31
- require 'fat_zebra/authorise'
31
+ require 'fat_zebra/authenticate'
32
32
  require 'fat_zebra/refund'
33
33
  require 'fat_zebra/payment_plan'
34
34
  require 'fat_zebra/customer'
@@ -38,6 +38,13 @@ require 'fat_zebra/bank_account'
38
38
  require 'fat_zebra/web_hook'
39
39
  require 'fat_zebra/batch'
40
40
 
41
+ # Paypal API Resources
42
+ require 'fat_zebra/paypal/billing_agreement'
43
+ require 'fat_zebra/paypal/order'
44
+ require 'fat_zebra/paypal/authorization'
45
+ require 'fat_zebra/paypal/capture'
46
+ require 'fat_zebra/paypal/refund'
47
+
41
48
  ##
42
49
  # Implementation of the FatZebra
43
50
  module FatZebra
@@ -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
+ - f7428654f99c8a3fbf1ed11296c3c3ea
35
+ X-Runtime:
36
+ - '0.273223'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"bybox0zptr3u8xuvtu7n","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,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
+ - 8c44198a31da27a6fbeb4287c2c275d6
35
+ X-Runtime:
36
+ - '0.285128'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"n82ssle496z37qlb11je","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:57 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":"n82ssle496z37qlb11je","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"c97f7619-fdb8-4030-90f4-382173011602","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":"d8785a0516bca0a94e59799fd261b161","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
+ - 5accccc7eb848af457114753663984b2
81
+ X-Runtime:
82
+ - '3.697173'
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":"y8otflT7BiRXgoTVLgr0","authentication_status_message":null,"card_bin":"512345","card_type_name":"MASTERCARD","commerce_indicator":"internet","proxy_pan":null,"currency":null,"request_id":"5762082191246265903009","request_token":"AxjzbwSTOFz0OB5eG2ehAAoCUaf/NLlIEg6cQkgoZNJMvRivpPBBCAAA9BJB","decision":"ACCEPT"},"errors":[],"test":true}'
88
+ http_version:
89
+ recorded_at: Fri, 13 Dec 2019 03:37:01 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
+ - 777b3cb15421d6f4395eadba9a84ed0a
35
+ X-Runtime:
36
+ - '0.289329'
37
+ Transfer-Encoding:
38
+ - chunked
39
+ body:
40
+ encoding: UTF-8
41
+ string: '{"successful":true,"response":{"token":"nemo83vwzemhe7sujaoq","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 04:49:26 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":"nemo83vwzemhe7sujaoq","amount":100,"currency":"AUD","customer_ip":"111.111.111.111","sca":{"type":"enrollment","merchant_reference_code":"fa0ced89-96e6-499c-a348-77262f72243f","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":"86a1d1afa4e37514362e764a324c32d5","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
+ - 9dc35f223ee70cd8aa7ab810d108c75b
81
+ X-Runtime:
82
+ - '2.737110'
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":"2dG79305l1LXQyVfnHf0","authentication_status_message":null,"card_bin":"512345","card_type_name":"MASTERCARD","commerce_indicator":"internet","proxy_pan":null,"currency":null,"request_id":"5762125682936018703010","request_token":"AxjzbwSTOF2Ou5R8gRKiAAoCUaf/NUVOEg6cQkgoZNJMvRivpPBBCAAA9BJB","decision":"ACCEPT"},"errors":[],"test":true}'
88
+ http_version:
89
+ recorded_at: Fri, 13 Dec 2019 04:49:29 GMT
90
+ recorded_with: VCR 3.0.3