-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 3dsecure options for securionpay
- Loading branch information
Karol Szolz
committed
Oct 14, 2019
1 parent
b715b4e
commit 7f9bf94
Showing
2 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,14 +86,28 @@ def test_invalid_raw_response | |
|
||
def test_client_data_submitted_with_purchase | ||
stub_comms(@gateway, :ssl_request) do | ||
updated_options = @options.merge({ description: 'test charge', ip: '127.127.127.127', user_agent: 'browser XXX', referrer: 'http://www.foobar.com', email: '[email protected]' }) | ||
updated_options = @options.merge({ | ||
description: 'test charge', | ||
ip: '127.127.127.127', | ||
user_agent: 'browser XXX', | ||
referrer: 'http://www.foobar.com', | ||
email: '[email protected]', | ||
three_d_secure: { | ||
require_attempt: true, | ||
require_enrolled_card: true, | ||
require_successful_liability_shift_for_enrolled_card: false | ||
} | ||
}) | ||
@gateway.purchase(@amount, @credit_card, updated_options) | ||
end.check_request do |method, endpoint, data, headers| | ||
assert_match(/description=test\+charge/, data) | ||
assert_match(/ip=127\.127\.127\.127/, data) | ||
assert_match(/user_agent=browser\+XXX/, data) | ||
assert_match(/referrer=http\%3A\%2F\%2Fwww\.foobar\.com/, data) | ||
assert_match(/metadata\[email\]=foo\%40bar\.com/, data) | ||
assert_match(/threeDSecure\[requireAttempt\]=true/, data) | ||
assert_match(/threeDSecure\[requireEnrolledCard\]=true/, data) | ||
assert_match(/threeDSecure\[requireSuccessfulLiabilityShiftForEnrolledCard\]=false/, data) | ||
end.respond_with(successful_purchase_response) | ||
end | ||
|
||
|