Skip to content
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

Merged
merged 1 commit into from
Sep 16, 2019
Merged

Worldpay: Add 3DS2 Support #3344

merged 1 commit into from
Sep 16, 2019

Conversation

nfarve
Copy link

@nfarve nfarve commented Sep 11, 2019

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

@nfarve nfarve requested a review from a team September 11, 2019 14:58
@@ -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')
Copy link
Contributor

@curiousepic curiousepic Sep 13, 2019

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

Copy link
Contributor

@curiousepic curiousepic Sep 13, 2019

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]?

Copy link
Author

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!

Copy link
Contributor

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?

@curiousepic
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Author

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.

Copy link
Author

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.

@nfarve
Copy link
Author

nfarve commented Sep 16, 2019

@curiousepic add a remote test!

@nfarve nfarve force-pushed the worldpay_3ds2 branch 4 times, most recently from 73dbb5e to cbebdb5 Compare September 16, 2019 19:14
Copy link
Contributor

@curiousepic curiousepic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💥 👍

@nfarve nfarve force-pushed the worldpay_3ds2 branch 5 times, most recently from 04af0f4 to 7bf2871 Compare September 16, 2019 19:38
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
@nfarve nfarve merged commit 20b865b into master Sep 16, 2019
@nfarve nfarve deleted the worldpay_3ds2 branch September 16, 2019 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants