-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat(compatibility): add refund retrieve endpoint which accepts gateway creds #958
feat(compatibility): add refund retrieve endpoint which accepts gateway creds #958
Conversation
…d-refund-sync-with-gateway-creds-stripe-compatibility
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.
Other than that, looks good to me!
@@ -49,6 +49,47 @@ pub async fn refund_create( | |||
.await | |||
} | |||
|
|||
#[instrument(skip_all)] | |||
#[get("/{refund_id}")] |
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.
Would this have to be /sync
@Abhicodes-crypto? As far as I remember, trying to register two handlers for the same route with the same HTTP method would cause the Actix server to panic at startup.
@@ -49,6 +49,47 @@ pub async fn refund_create( | |||
.await | |||
} | |||
|
|||
#[instrument(skip_all)] | |||
#[get("/{refund_id}")] |
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.
The route should be post("/sync")
.
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
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.
Route change requested.
Type of Change
Description
This PR is based on the issue #920 to add refund sync with gateway creds in stripe compatibility.
Adds a new service refund_retrieve_with_gateway_creds which parses the JSON to type RefundsRetrieveRequest which already has an optional field merchant_connector_details to accept gateway credentials and then calls the normal refund retrieve API
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy