-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worldpay: Add 3DS2 Support #3344
Conversation
@@ -208,6 +208,8 @@ def build_authorization_request(money, payment_method, options) | |||
add_instalments_data(xml, options) | |||
end | |||
add_moto_flag(xml, options) if options.dig(:metadata, :manual_entry) | |||
add_additional_3ds_data(xml, options) if options[:execute_threed] && options[:three_ds_version] && options[:three_ds_version].include?('2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably ridiculous but theoretically three_ds_version
could be 1.2
? So ideally this might be something like options[:three_ds_version][0] == '2'
or options[:three_ds_version].start_with?('2')
EDIT: In fact, one of the remote tests sends version as 1.0.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also shouldn't this be checking options[:three_d_secure][:version]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I believe we only send options[:three_d_secure][:version]
when we pass the authenticated fields. For regular 3DS fields we send it in the options directly. Will update though so it checks it if starts with 2. Good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, I'm conflating this with pass-through. Not seeing any remote tests, are we doing that external to AM?
Does their sandbox not handle 3ds2 properly or can we add remote tests for that flow? |
@@ -330,6 +340,7 @@ def add_card(xml, payment_method, options) | |||
end | |||
|
|||
xml.tag! 'cardHolderName', options[:execute_threed] ? '3D' : payment_method.name | |||
# xml.tag! 'cardHolderName', payment_method.name #When testing 3DS 2.0 uncomment and comment above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we remove this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we need to do this to test our remote tests from core unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually thought of a way to get rid of this.
cdd2170
to
db85e1d
Compare
db85e1d
to
02e4ab0
Compare
@curiousepic add a remote test! |
73dbb5e
to
cbebdb5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💥 👍
04af0f4
to
7bf2871
Compare
Adds 3DS support to worldpay gateway. Two remote tests failing that are unlreated. Loaded suite test/remote/gateways/remote_worldpay_test ................................................. 51 tests, 221 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 96.0784% passed Loaded suite test/unit/gateways/worldpay_test Started ................................................................... 67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed
7bf2871
to
20b865b
Compare
Adds 3DS support to worldpay gateway. Two remote tests failing that are
unlreated.
Loaded suite test/remote/gateways/remote_worldpay_test
.................................................
51 tests, 221 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.0784% passed
Loaded suite test/unit/gateways/worldpay_test
Started
...................................................................
67 tests, 397 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed