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

Enabling of recurring_detail_reference gateway specific field in other transactions #5285

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

Conversation

rubenmarindev
Copy link
Contributor

Summary:

Enabling of recurring_detail_reference gateway specific field in other transactions like purchase or refund for Adyen Gateway

Spreedly reference:

OPPS-9

Unit tests:

Finished in 0.118443 seconds.
130 tests, 701 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

Remote tests:

Finished in 178.393637 seconds.
148 tests, 498 assertions, 5 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
96.6216% passed

Failure tests not related to changes

add_card(post, payment)
end

post[:selectedRecurringDetailReference] = recurring_detail_reference

Choose a reason for hiding this comment

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

I rather this not be added to this method. It's better to create a separate method for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@rubenmarindev rubenmarindev force-pushed the OPPS-9_enable_recurring_detail_reference_for_adyen_transactions branch from dd93894 to 93c45ab Compare October 4, 2024 21:59
add_card(post, payment)
end

add_recurring_detail_reference(post, recurring_detail_reference)
Copy link

@almalee24 almalee24 Oct 8, 2024

Choose a reason for hiding this comment

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

This method is good but it needs to be moved out of add_payment and moved into authorize and any other main method that supports this selectedRecurringDetailReference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@rubenmarindev rubenmarindev force-pushed the OPPS-9_enable_recurring_detail_reference_for_adyen_transactions branch from 93c45ab to 732cfaa Compare October 10, 2024 23:09
@@ -164,7 +170,7 @@ def unstore(options = {})

add_shopper_reference(post, options)
add_merchant_account(post, options)
post[:recurringDetailReference] = options[:recurring_detail_reference]
add_recurring_detail_reference(post, options)

Choose a reason for hiding this comment

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

This you have to leave it as it was before because this endpoint doesn't accept selectedRecurringDetailReference but it takes recurringDetailReference https://docs.adyen.com/api-explorer/Recurring/68/post/disable#request-recurringDetailReference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@@ -146,6 +151,7 @@ def store(credit_card, options = {})
add_network_transaction_reference(post, options)
options[:recurring_contract_type] ||= 'RECURRING'
add_recurring_contract(post, options)
add_recurring_detail_reference(post, options)

Choose a reason for hiding this comment

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

I'm thinking this is the same as the unstore method where this has to be recurringDetailReference. I can't find the documentation but it's the same API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@@ -124,6 +127,7 @@ def void(authorization, options = {})
endpoint = options[:cancel_or_refund] ? 'cancelOrRefund' : 'cancel'
add_reference(post, authorization, options)
add_network_transaction_reference(post, options)
add_recurring_detail_reference(post, options)

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@@ -90,6 +92,7 @@ def refund(money, authorization, options = {})
add_reference(post, authorization, options)
add_splits(post, options)
add_network_transaction_reference(post, options)
add_recurring_detail_reference(post, options)

Choose a reason for hiding this comment

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

This endpoint doesn't seem to support this field, https://docs.adyen.com/api-explorer/Payment/68/post/refund

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@@ -81,6 +82,7 @@ def capture(money, authorization, options = {})
add_splits(post, options)
add_network_transaction_reference(post, options)
add_shopper_statement(post, options)
add_recurring_detail_reference(post, options)

Choose a reason for hiding this comment

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

This endpoint doesn't seem to support this field, https://docs.adyen.com/api-explorer/Payment/68/post/capture

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

…r transactions like purchase or refund for Adyen Gateway
@rubenmarindev rubenmarindev force-pushed the OPPS-9_enable_recurring_detail_reference_for_adyen_transactions branch from 732cfaa to 3579503 Compare October 11, 2024 22:14
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