-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
Enabling of recurring_detail_reference gateway specific field in other transactions #5285
Conversation
add_card(post, payment) | ||
end | ||
|
||
post[:selectedRecurringDetailReference] = recurring_detail_reference |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
dd93894
to
93c45ab
Compare
add_card(post, payment) | ||
end | ||
|
||
add_recurring_detail_reference(post, recurring_detail_reference) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
93c45ab
to
732cfaa
Compare
@@ -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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These endpoints also don't support this field, https://docs.adyen.com/api-explorer/Payment/68/post/cancel and https://docs.adyen.com/api-explorer/Payment/68/post/cancelOrRefund
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
732cfaa
to
3579503
Compare
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