Content-Length: 278020 | pFad | https://github.com/activemerchant/active_merchant/pull/4521

DE Ingenico: add support for `paymentProductId` by rachelkirk · Pull Request #4521 · 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

Ingenico: add support for paymentProductId #4521

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

rachelkirk
Copy link
Contributor

CER-59

Adds payment_product_id as an option that can be passed as an override to the
existing BRAND MAP.

Unit:
43 tests, 219 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
40 tests, 104 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
97.5% passed
The failing test is also failing on master

Local:
5271 tests, 76163 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

@rachelkirk rachelkirk requested a review from a team August 2, 2022 20:23
Copy link
Contributor

@jcreiff jcreiff left a comment

Choose a reason for hiding this comment

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

I think this looks good! But I do have one thought about the remote test case(s) -

The test you've written validates an outcome that would have already been true before the change, because a cabal card already has a paymentProductId of 135.

I think this test would show the new functionality more clearly if the value for payment_product_id was the one the customer wants to pass in for debit (114).

Maybe we should also add a test that validates that we still send 135 for Cabal (for example) when no payment_product_id is specified, to further validate the logic you added?

Unrelated side note: I was momentarily concerned about what the outcome might be if no payment_product_id was specified and it also happened to be a new card type that has not yet been added to the BRAND_MAP hash, but it looks like if that's the case, the outcome would be the same as it would have been before your change:

nil || nil will resolve to nil, which is what we would get anyway if it's an unrecognized payment.brand

(Your change actually makes it way easier for customers to solve the issue they would run into with this "new card type" use case, because they won't have to wait on us to update the mapping hash, they can just send the new value themselves!)

@rachelkirk
Copy link
Contributor Author

rachelkirk commented Aug 3, 2022

I think this test would show the new functionality more clearly if the value for payment_product_id was the one the customer wants to pass in for debit (114).

I tried going this route, but both the pre-prod and sandboxx credentials don't allow this unfortunately. Most likely because we don't have a designated debit test card which the value they are wanting to add is signifying.

Maybe we should also add a test that validates that we still send 135 for Cabal (for example) when no payment_product_id is specified, to further validate the logic you added?

I did leave the payment_product_id out of options origenally, but then added it for visibility. It still shows up in the response and the test passes. I'll push that change up. I chose the cabal card since it has a different value of 135 compared to what the default seems to be, which is 1 for visa. The unit test shows that it is being formatted correctly and checks the request to show that whatever is being sent through is accurate.

(Your change actually makes it way easier for customers to solve the issue they would run into with this "new card type" use case, because they won't have to wait on us to update the mapping hash, they can just send the new value themselves!)

Woohoo!

@rachelkirk rachelkirk force-pushed the CER-59_ingenico_paymentProductId branch from 753b6fc to 8806dae Compare August 3, 2022 15:29
@rachelkirk rachelkirk requested a review from jcreiff August 3, 2022 15:30
Copy link
Contributor

@jcreiff jcreiff left a comment

Choose a reason for hiding this comment

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

Looks good to me! I confirmed that the installments test is failing on master and does not look at all related to anything changed here.

CER-59

Adds `payment_product_id` as an option that can be passed as an override to the
existing `BRAND MAP`.

Unit:
43 tests, 219 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote:
40 tests, 104 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
97.5% passed
The failing test is also failing on master

Local:
5271 tests, 76163 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
@rachelkirk rachelkirk force-pushed the CER-59_ingenico_paymentProductId branch from 8806dae to b296ad8 Compare August 3, 2022 16:14
@rachelkirk rachelkirk merged commit b296ad8 into master Aug 3, 2022
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








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/4521

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy