-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(charges): integrated PaymentSync for stripe connect #4771
Conversation
e290897
to
b12316b
Compare
} | ||
} | ||
api::Amount::Value(amount) => { | ||
if charges.fees.get_amount_as_i64() > amount.into() { |
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.
what if charges.fees is lesser than the amount, is it valid?
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.
fees being charged should always be lesser than the actual amount, that's the only* valid case
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.
Approving on behalf of connectors
Type of Change
Description
This PR adds the charges sync capability (for
PaymentSync
andRefundSync
) for Stripe connector.Additional Changes
Motivation and Context
PaymentSync
operation makes a get payment intent call to the underlying connector for fetching the payment details. This is used in HyperSwitch for updating the details of the payment stored at HyperSwitch's end. Capability for fetching charged payments for Stripe needs to be added in case a charged payment was made. This was earlier missed in this PR - #4628How did you test it?
1. Create a 3DS txn
cURL
Response
3. Fetch payment details
cURL
Response
4. Create a refund
cURL
Response
5. Sync the charged refund
cURL
Response (should not contain any error_code or error_message)
6. Retrieve the refund
cURL
Response (should not contain any error_code or error_message)
Checklist
cargo +nightly fmt --all
cargo clippy