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

ECS-3530 Adyen Format error fix #5155

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

jherreraa
Copy link
Collaborator

ECS-3530

Summary:

This PR fix format error using NT

Unit tests

Finished in 0.126432 seconds.

121 tests, 641 assertions, 0 failures,
0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed

Remote tests

Finished in 609.957316 seconds.

143 tests, 464 assertions, 11 failures,
0 errors, 0 pendings, 0 omissions, 0 notifications 92.3077% passed

0.23 tests/s, 0.76 assertions/s

-> failures not related to change

@jherreraa jherreraa requested a review from almalee24 June 25, 2024 20:43
@almalee24 almalee24 marked this pull request as ready for review June 26, 2024 16:10
@almalee24
Copy link

There's also a Rubocop error which is why the GitHub actions tests are failing

@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch 3 times, most recently from 69c643a to 538b85d Compare June 26, 2024 20:56
@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 538b85d to 30babca Compare June 27, 2024 19:43
@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 30babca to 712d57c Compare July 5, 2024 15:39
@DustinHaefele
Copy link
Contributor

I added the conditional back into the app_mpi_data_for_network_tokenization_card method updating the cavv to tokenAuthenticationVerificationValue. It seems to me that the issue in the tests is with ApplePay and GooglePay. We need to be able to differentiate these from the standard network token flow, and continue to pass that value as cavv for apple pay and google pay.

Then we also need to continue to pass the existing recurring_contract info for apple_pay and google pay and only update that when it is a pure network token.

cc: @almalee24 @jherreraa

@DustinHaefele DustinHaefele self-requested a review July 8, 2024 14:42
Copy link
Contributor

@DustinHaefele DustinHaefele left a comment

Choose a reason for hiding this comment

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

I left a couple of individual comments on this one.

We may not need to reach out to Adyen if we handle the situations we left in my second comment.

@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 712d57c to 634bc81 Compare July 16, 2024 20:04
@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 634bc81 to 46d3a6e Compare July 16, 2024 20:18
DustinHaefele
DustinHaefele previously approved these changes Jul 16, 2024
@DustinHaefele
Copy link
Contributor

Great work on this one Johan, I know this framework can be a bit tricky!

@DustinHaefele DustinHaefele dismissed their stale review July 22, 2024 14:18

I found another edge case that needs to be handled before we deploy this.

@DustinHaefele DustinHaefele self-requested a review July 22, 2024 14:18
Copy link
Contributor

@DustinHaefele DustinHaefele left a comment

Choose a reason for hiding this comment

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

@jherreraa, Hey, I found one more issue that we need to resolve before merging this. It should be a quick fix though.

Also maybe add at least one test on apple pay and google pay where the new flag is set to false so we make sure that it passes in both cases.

lib/active_merchant/billing/gateways/adyen.rb Outdated Show resolved Hide resolved
@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 46d3a6e to 26eac3c Compare July 24, 2024 19:23
Copy link
Contributor

@DustinHaefele DustinHaefele 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 is the last thing that we need to solidify and then we are good to go on this. I know this has been a long one, thanks for sticking with it!

lib/active_merchant/billing/gateways/adyen.rb Outdated Show resolved Hide resolved
@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 26eac3c to 8b82d84 Compare July 25, 2024 19:57
@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 8b82d84 to 38b395f Compare July 29, 2024 19:13
@jherreraa jherreraa requested a review from almalee24 July 29, 2024 19:17
def add_recurring_contract(post, options = {})
return unless options[:recurring_contract_type]
def add_recurring_contract(post, options = {}, payment = nil)
return unless options[:recurring_contract_type] || (payment.try(:source) && options[:switch_cryptogram_mapping_nt])
Copy link

@almalee24 almalee24 Jul 30, 2024

Choose a reason for hiding this comment

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

This needs to be payment.try(:source) == :network_token && options[:switch_cryptogram_mapping_nt]

@jherreraa jherreraa force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 38b395f to dea3ee6 Compare July 31, 2024 19:42
@DustinHaefele DustinHaefele force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 180d6e6 to 51d2123 Compare August 8, 2024 13:58
[ECS-3530](https://spreedly.atlassian.net/browse/ECS-3530)

This PR fix format error using NT

Unit tests
----------------
Finished in 0.126432 seconds.

121 tests, 641 assertions, 0 failures,
0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote tests
----------------
Finished in 609.957316 seconds.

143 tests, 464 assertions, 11 failures,
0 errors, 0 pendings, 0 omissions, 0 notifications
92.3077% passed

0.23 tests/s, 0.76 assertions/s

-> failures not related to change
@almalee24 almalee24 force-pushed the ECS-3430_Adyen_Format_Error_Fix branch from 51d2123 to 19370e2 Compare August 14, 2024 16:21
@almalee24 almalee24 merged commit 19370e2 into master Aug 14, 2024
5 checks passed
@almalee24 almalee24 deleted the ECS-3430_Adyen_Format_Error_Fix branch August 14, 2024 16:55
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.

None yet

3 participants