spreedly 2.0.21 → 2.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/spreedly/environment.rb +1 -1
- data/lib/spreedly/transactions/auth_purchase.rb +1 -1
- data/lib/spreedly/version.rb +1 -1
- data/test/remote/remote_purchase_test.rb +7 -7
- data/test/unit/authorize_test.rb +1 -0
- data/test/unit/purchase_test.rb +1 -0
- data/test/unit/response_stubs/authorization_stubs.rb +1 -0
- data/test/unit/response_stubs/purchase_stubs.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e70f210f69afcc8cc7d6a9bce08f864802fc935acaf52fbb698616fb944c8632
|
4
|
+
data.tar.gz: 81421c8ea635cd9a71a0548d7f06bff34fdcd62464dfebc2d3c55055cb345b23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fa6bdbbe9e3cbec3b0a0af952ba0abcf5cf5197851bcca81407c407d2df8f3497e29eedf4b5b1733d2c0ce3c24286cad37b2257853f396d594aed03dd487ef8
|
7
|
+
data.tar.gz: b493567ba4ba474cd26d79615c4e29e51b0afc6982dd0f4d19d7ca0771dc516b3a83312c5fd0063ef30fc29f05e9aa086cd2785e60bd5fab720531aa8bc580eb
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [2.0.22] - 2019-08-14
|
6
|
+
### Added
|
7
|
+
- @jeremywrowe - Support for three_ds_version, three_ds_context, and channel on
|
8
|
+
authorization / purchase
|
9
|
+
|
5
10
|
## [2.0.21] - 2019-07-19
|
6
11
|
### Added
|
7
12
|
- @jeremywrowe - Support for Stored Credentials on authorization / purchase
|
data/lib/spreedly/environment.rb
CHANGED
@@ -302,7 +302,7 @@ module Spreedly
|
|
302
302
|
add_shipping_address_override(doc, options)
|
303
303
|
add_to_doc(doc, options, :order_id, :description, :ip, :email, :merchant_name_descriptor,
|
304
304
|
:merchant_location_descriptor, :redirect_url, :callback_url,
|
305
|
-
:continue_caching, :attempt_3dsecure, :browser_info)
|
305
|
+
:continue_caching, :attempt_3dsecure, :browser_info, :three_ds_version, :channel)
|
306
306
|
end
|
307
307
|
|
308
308
|
def add_gateway_specific_fields(doc, options)
|
@@ -2,7 +2,7 @@ module Spreedly
|
|
2
2
|
class AuthPurchase < GatewayTransaction
|
3
3
|
field :currency_code, :checkout_url, :checkout_form, :redirect_url, :callback_url
|
4
4
|
field :required_action, :challenge_form, :challenge_url, :device_fingerprint_form
|
5
|
-
field :stored_credential_initiator, :stored_credential_reason_type
|
5
|
+
field :stored_credential_initiator, :stored_credential_reason_type, :three_ds_context
|
6
6
|
field :amount, type: :integer
|
7
7
|
|
8
8
|
attr_reader :payment_method
|
data/lib/spreedly/version.rb
CHANGED
@@ -87,8 +87,8 @@ class RemotePurchaseTest < Test::Unit::TestCase
|
|
87
87
|
def test_3d_secure_attempt_transaction_arguments
|
88
88
|
gateway_token = @environment.add_gateway(:test).token
|
89
89
|
card_token = create_card_on(@environment, number: '4556761029983886', retained: false).token
|
90
|
-
|
91
|
-
transaction = @environment.purchase_on_gateway(gateway_token, card_token,
|
90
|
+
browser_info = "eyJ3aWR0aCI6MzAwOCwiaGVpZ2h0IjoxNjkyLCJkZXB0aCI6MjQsInRpbWV6b25lIjoyNDAsInVzZXJfYWdlbnQiOiJNb3ppbGxhLzUuMCAoTWFjaW50b3NoOyBJbnRlbCBNYWMgT1MgWCAxMC4xNDsgcnY6NjguMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC82OC4wIiwiamF2YSI6ZmFsc2UsImxhbmd1YWdlIjoiZW4tVVMiLCJhY2NlcHRfaGVhZGVyIjoidGV4dC9odG1sLGFwcGxpY2F0aW9uL3hodG1sK3htbCxhcHBsaWNhdGlvbi94bWwifQ=="
|
91
|
+
transaction = @environment.purchase_on_gateway(gateway_token, card_token, 3004,
|
92
92
|
order_id: "8675",
|
93
93
|
description: "SuperDuper",
|
94
94
|
ip: "183.128.100.103",
|
@@ -98,13 +98,13 @@ class RemotePurchaseTest < Test::Unit::TestCase
|
|
98
98
|
retain_on_success: true,
|
99
99
|
redirect_url: "https://example.com/redirect",
|
100
100
|
callback_url: "https://example.com/callback",
|
101
|
-
|
101
|
+
browser_info: browser_info,
|
102
|
+
attempt_3dsecure: true,
|
103
|
+
three_ds_version: "2.0")
|
102
104
|
|
103
105
|
assert_equal "pending", transaction.state
|
104
|
-
|
105
|
-
|
106
|
-
assert_equal '', transaction.checkout_url
|
107
|
-
assert transaction.checkout_form.include?("<form action=\"https://core.spreedly.com/test/#{gateway_token}")
|
106
|
+
assert_equal "https://example.com/redirect", transaction.redirect_url
|
107
|
+
assert_equal "device_fingerprint", transaction.required_action
|
108
108
|
end
|
109
109
|
|
110
110
|
def test_optional_arguments
|
data/test/unit/authorize_test.rb
CHANGED
@@ -28,6 +28,7 @@ class AuthorizeTest < Test::Unit::TestCase
|
|
28
28
|
assert_equal 'Tax Free Zone', t.merchant_location_descriptor
|
29
29
|
assert_equal 'YjWxOjbpeieXsZFdAsbhM2DFgLe', t.gateway_token
|
30
30
|
assert_equal "44", t.gateway_transaction_id
|
31
|
+
assert_equal "three-ds-context", t.three_ds_context
|
31
32
|
assert_equal "Authorization", t.transaction_type
|
32
33
|
assert_equal "TheName", t.gateway_specific_fields[:litle][:descriptor_name]
|
33
34
|
assert_equal "33411441", t.gateway_specific_fields[:litle][:descriptor_phone]
|
data/test/unit/purchase_test.rb
CHANGED
@@ -30,6 +30,7 @@ class PurchaseTest < Test::Unit::TestCase
|
|
30
30
|
assert_equal '8xXXIPGXTaPXysDA5OUpgnjTEjK', t.payment_method.token
|
31
31
|
assert_equal "44", t.gateway_transaction_id
|
32
32
|
assert_equal "Purchase", t.transaction_type
|
33
|
+
assert_equal "three-ds-context", t.three_ds_context
|
33
34
|
|
34
35
|
assert t.response.success
|
35
36
|
assert_equal 'Successful purchase', t.response.message
|
@@ -17,6 +17,7 @@ module AuthorizationStubs
|
|
17
17
|
<description>LotsOCoffee</description>
|
18
18
|
<merchant_name_descriptor>My Writeoff Inc.</merchant_name_descriptor>
|
19
19
|
<merchant_location_descriptor>Tax Free Zone</merchant_location_descriptor>
|
20
|
+
<three_ds_context>three-ds-context</three_ds_context>
|
20
21
|
<gateway_specific_fields>
|
21
22
|
<litle>
|
22
23
|
<descriptor_name>TheName</descriptor_name>
|
@@ -22,6 +22,7 @@ module PurchaseStubs
|
|
22
22
|
<message key="messages.transaction_succeeded">Succeeded!</message>
|
23
23
|
<gateway_token>YOaCn5a9xRaBTGgmGAWbkgWUuqv</gateway_token>
|
24
24
|
<gateway_transaction_id>44</gateway_transaction_id>
|
25
|
+
<three_ds_context>three-ds-context</three_ds_context>
|
25
26
|
<shipping_address>
|
26
27
|
<name nil="true"/>
|
27
28
|
<address1 nil="true"/>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreedly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spreedly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|