Content-Length: 284223 | pFad | https://github.com/activemerchant/active_merchant/pull/4694

A0 Payeezy: Handle nil and empty values for Apple Pay by naashton · Pull Request #4694 · 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

Payeezy: Handle nil and empty values for Apple Pay #4694

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

naashton
Copy link
Contributor

@naashton naashton commented Feb 6, 2023

Payeezy support has indicated that passing empty or nil values in place of the xid and cavv may result in failed transactions for AMEX based AP tokens. They also informed us that the eci_indicator value should default to 5 instead of passing a nil value, following a similar pattern.

This PR ignores empty payment_cryptogram and defaults the eci_indicator to 5 if that value is nil.

Unit: 6 tests, 211 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed

Remote: 46 tests, 184 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed

Payeezy support has indicated that passing empty or nil values in place
of the `xid` and `cavv` may result in failed transactions for AMEX based
AP tokens. They also informed us that the `eci_indicator` value should
default to `5` instead of passing a nil value, following a similar
pattern.

This PR ignores empty `payment_cryptogram` and defaults the
`eci_indicator` to `5` if that value is `nil`.

Unit: 6 tests, 211 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote: 46 tests, 184 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
@naashton naashton requested a review from a team February 6, 2023 17:09
Comment on lines +250 to +251
nt_card[:xid] = payment_method.payment_cryptogram unless payment_method.payment_cryptogram.empty?
nt_card[:cavv] = payment_method.payment_cryptogram unless payment_method.payment_cryptogram.empty?
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these need to be set to nil or omitted from being sent if there is no payment_cryptogram?

Copy link

Choose a reason for hiding this comment

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

Does this impact/benefit all customers of this gateway type (i.e.: is it an issue every customer faces presently) or just the one customer (Priceline?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were explicitly told by Payeezy to NOT send nil values for these fields as they "could" lead to errors. These fields are optional according to Payeezy's documentation.

AFAIK, Priceline is the only user of AP on Payeezy, but this should not negatively impact any other customers of this gateway.

Copy link
Contributor

Choose a reason for hiding this comment

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

@chudel this would benefit all customers of this gateway type

@naashton naashton requested review from aenand and chudel February 8, 2023 14:44
@naashton naashton merged commit 2044af3 into activemerchant:master Feb 8, 2023
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/4694

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy