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: Support apple pay recurring #5268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KenderBolivarT
Copy link

@KenderBolivarT KenderBolivarT commented Sep 18, 2024

COMP-73

Adds support for Apple Pay MIT recurring

Unit:

125 tests, 702 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:

111 tests, 479 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
98.1982% passed

Copy link
Contributor

@aenand aenand left a comment

Choose a reason for hiding this comment

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

Solid PR! I should have clarified that wallet_type is not related to Apple Pay (despite the similar sounding names)

lib/active_merchant/billing/gateways/worldpay.rb Outdated Show resolved Hide resolved
test/remote/gateways/remote_worldpay_test.rb Outdated Show resolved Hide resolved
test/remote/gateways/remote_worldpay_test.rb Outdated Show resolved Hide resolved
test/remote/gateways/remote_worldpay_test.rb Show resolved Hide resolved
test/unit/gateways/worldpay_test.rb Outdated Show resolved Hide resolved
response = stub_comms do
@gateway.authorize(@amount, @apple_pay_network_token_without_payment_cryptogram, @options)
end.check_request do |_endpoint, data, _headers|
assert_match %r(<EMVCO_TOKEN-SSL type="APPLEPAY">), data
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a check to ensure the cryptogram is not sent? Maybe something like this:

Suggested change
assert_match %r(<EMVCO_TOKEN-SSL type="APPLEPAY">), data
refute_match %r(<cryptogram>), data

COMP-73

Adds support for Apple Pay MIT recurring

Test Summary
Local:

Unit:
125 tests, 702 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
111 tests, 479 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
98.1982% 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.

2 participants