Content-Length: 278840 | pFad | https://github.com/activemerchant/active_merchant/pull/4957

B8 Add 3DS global support to Commerce Hub gateway by sinourain · Pull Request #4957 · activemerchant/active_merchant · GitHub
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

Add 3DS global support to Commerce Hub gateway #4957

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

sinourain
Copy link
Contributor

Description

Add 3DS global support to Commerce Hub gateway

Tickets for Spreedly reference
SER-922

Unit test

Finished in 23.891463 seconds.
5671 tests, 78366 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed

Remote test

237.37 tests/s, 3280.08 assertions/s

Rubocop

778 files inspected, no offenses detected

Copy link
Collaborator

@Heavyblade Heavyblade left a comment

Choose a reason for hiding this comment

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

Looks pretty much OK @sinourain, left a simple style comment

@@ -109,6 +109,22 @@ def scrub(transcript)

private

def add_three_d_secure(post, payment, options)
params = post[:additionalData3DS] = {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

💬 Style/Comment:

Totally after you, but being more declarative than procedimental is always better:

def add_three_d_secure(post, payment, options)
  return unless three_d_secure = options[:three_d_secure]

  post[:additionalData3DS] = {
    dsTransactionId: three_d_secure[:ds_transaction_id],
    authenticationStatus: three_d_secure[:authentication_response_status],
    serviceProviderTransactionId: three_d_secure[:three_ds_server_trans_id],
    acsTransactionId: three_d_secure[:acs_transaction_id],
    mpiData: {
      cavv: three_d_secure[:cavv],
      eci: three_d_secure[:eci],
      xid: three_d_secure[:xid]
    }.compact,
    version data: { recommendedVersion: three_d_secure[:version] }
  }.compact
end

@sinourain sinourain force-pushed the commercehub_add_3ds_support branch from 3fee156 to 393e3dd Compare November 14, 2023 17:50
@sinourain sinourain marked this pull request as ready for review November 14, 2023 18:06
@sinourain sinourain requested a review from naashton November 14, 2023 18:08
-------------------------
Add 3DS global support to Commerce Hub gateway

Tickets for Spreedly reference
SER-922

Unit test
-------------------------
Finished in 23.891463 seconds.
5671 tests, 78366 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote test
-------------------------
237.37 tests/s, 3280.08 assertions/s

Rubocop
-------------------------
778 files inspected, no offenses detected
@naashton naashton force-pushed the commercehub_add_3ds_support branch from 393e3dd to f5dd610 Compare November 15, 2023 19:59
@naashton naashton merged commit 5a1c4a3 into master Nov 15, 2023
5 checks passed
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/activemerchant/active_merchant/pull/4957

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy