From cfb04395dd987d3188c875be574d604a433ae2a0 Mon Sep 17 00:00:00 2001 From: imran-bayonet Date: Mon, 12 Mar 2018 12:35:51 -0600 Subject: [PATCH 1/4] Add bayonet_tracking_id to Ecommerce consult response --- lib/bayonet_client/response.rb | 5 ++++- lib/bayonet_client/version.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/bayonet_client/response.rb b/lib/bayonet_client/response.rb index 3272896..c8e98e6 100644 --- a/lib/bayonet_client/response.rb +++ b/lib/bayonet_client/response.rb @@ -4,7 +4,7 @@ module BayonetClient class BayonetResponse attr_accessor :rules_triggered, - :decision, :payload, :reason_code, + :decision, :bayonet_tracking_id, :payload, :reason_code, :reason_message, :request_body, :bayonet_fingerprint, :raw @@ -16,6 +16,9 @@ def initialize(parsed_response) if parsed_response.key?('decision') self.decision = parsed_response['decision'] end + if parsed_response.key?('bayonet_tracking_id') + self.bayonet_tracking_id = parsed_response['bayonet_tracking_id'] + end if parsed_response.key?('payload') self.payload = parsed_response['payload'] end diff --git a/lib/bayonet_client/version.rb b/lib/bayonet_client/version.rb index ddaa047..a9a6bf8 100644 --- a/lib/bayonet_client/version.rb +++ b/lib/bayonet_client/version.rb @@ -1,4 +1,4 @@ module BayonetClient - VERSION = '2.1.2' + VERSION = '2.2.0' SUPPORTED_API_VERSIONS = ['2'] end From 20fcc099ce9c896f6730d0261bff712ff635a7e6 Mon Sep 17 00:00:00 2001 From: imran-bayonet Date: Mon, 12 Mar 2018 12:43:59 -0600 Subject: [PATCH 2/4] Add order_id to ecommerce test fixtures --- spec/fixtures/api_params.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/fixtures/api_params.yaml b/spec/fixtures/api_params.yaml index d5369d5..db01298 100644 --- a/spec/fixtures/api_params.yaml +++ b/spec/fixtures/api_params.yaml @@ -27,6 +27,7 @@ params_consult: { }, payment_method: card, transaction_time: 1476813671, + order_id: test_ruby_123, transaction_id: test_ruby_123, payment_gateway: stripe, channel: ecommerce, From 3e45ad2343f11bebe3d67b9d68ec87672f7759bc Mon Sep 17 00:00:00 2001 From: imran-bayonet Date: Mon, 12 Mar 2018 12:55:43 -0600 Subject: [PATCH 3/4] version bump --- lib/bayonet_client/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bayonet_client/version.rb b/lib/bayonet_client/version.rb index a9a6bf8..b0870ac 100644 --- a/lib/bayonet_client/version.rb +++ b/lib/bayonet_client/version.rb @@ -1,4 +1,4 @@ module BayonetClient - VERSION = '2.2.0' + VERSION = '2.2.1' SUPPORTED_API_VERSIONS = ['2'] end From 2f25767a00ee1da95732c7490c83929bb7083155 Mon Sep 17 00:00:00 2001 From: Imran Arshad Date: Mon, 12 Mar 2018 12:59:31 -0600 Subject: [PATCH 4/4] Add `order_id` and `bayonet_tracking_id` to examples --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2361a16..b744d32 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,8 @@ Once you have Bayonet's SDK configured, you can call the APIs with the following zip_code: '64000' }, payment_method: 'card', - transaction_id: '' + order_id: '', + transaction_id: '', payment_gateway: 'stripe', coupon: 'discount_buen_fin', expedited_shipping: true, @@ -103,10 +104,13 @@ Once you have Bayonet's SDK configured, you can call the APIs with the following ```ruby BayonetClient::Ecommerce.update-transaction({ + order_id: '', transaction_id: '', + bayonet_tracking_id: '', transaction_status: 'success', ... }) + # please note that you can use either one of 'order_id', 'transaction_id', or 'bayonet_tracking_id' to update the status of a transaction ``` * Feedback-historical API