-
Notifications
You must be signed in to change notification settings - Fork 1.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
feat(core): add support for confirmation flow for click to pay #6982
feat(core): add support for confirmation flow for click to pay #6982
Conversation
…2-refactor-refactor-ctp-flow-to-fetch-mca_id-and-get-the-connector-creds-instead-of-connector_name
…_id-and-get-the-connector-creds-instead-of-connector_name
…-the-connector-creds-instead-of-connector_name' of https://github.com/juspay/hyperswitch into 7862-refactor-refactor-ctp-flow-to-fetch-mca_id-and-get-the-connector-creds-instead-of-connector_name
…_id-and-get-the-connector-creds-instead-of-connector_name
…ow-for-click-to-pay
…5-feature-add-support-for-confirmation-flow-for-click-to-pay
crates/router/src/core/payments.rs
Outdated
@@ -394,6 +396,7 @@ where | |||
&business_profile, | |||
&key_store, | |||
mandate_type, | |||
&false, |
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.
As this does not provide the information about what is this field, can we make this as enum for better readability ?
Some("Approval Code received".to_string()), | ||
), | ||
_ => ( | ||
Some("03".to_string()), |
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.
Can we please give code comments for this hardcoding
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 reason for the code is provided, which states based in transaction we need to send 02
to mastercard stating approval code received
and same for code 03
59bf3b9
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: sai-harsha-vardhan <[email protected]> Co-authored-by: Sai Harsha Vardhan <[email protected]>
* 'main' of github.com:juspay/hyperswitch: fix(connector): [DATATRANS] Fix Force Sync Flow (#7331) chore(version): 2025.02.21.0 fix(connector): [DATATRANS] Add new payment status (#7327) feat(router): [Xendit] add support for split payments (#7143) fix(payment_methods_v2): update fingerprint implementation in v2 (#7270) feat(router): Add Payments - List endpoint for v2 (#7191) feat(core): add support for confirmation flow for click to pay (#6982) chore(version): 2025.02.20.0 fix(connector): [SCRIPT] Update template generating script and updated connector doc (#7301) ci(cypress): add assertions for `requires_cvv` (#7296) refactor(utils): match string for state with SDK's naming convention (#7300) feat(core): add hypersense integration api (#7218) chore(version): 2025.02.19.0 feat(connector): [Moneris] Add payments flow (#7249) feat(core): api ,domain and diesel model changes for extended authorization (#6607) feat(payments): [Payment links] Add configs for payment link (#7288)
…tusedPM * 'main' of github.com:juspay/hyperswitch: (22 commits) feat(connector): add Samsung pay mandate support for Cybersource (#7298) chore(masking): add peek_mut to PeekInterface (#7281) feat(samsung_pay): collect customer address details form Samsung Pay based on business profile config and connector required fields (#7320) ci: update creds (#7345) feat(router): add `merchant_configuration_id` in netcetera metadata and make other merchant configurations optional (#7347) fix(routing): Fixed 5xx error logs in dynamic routing metrics (#7335) fix(connector): [DATATRANS] Fix Force Sync Flow (#7331) chore(version): 2025.02.21.0 fix(connector): [DATATRANS] Add new payment status (#7327) feat(router): [Xendit] add support for split payments (#7143) fix(payment_methods_v2): update fingerprint implementation in v2 (#7270) feat(router): Add Payments - List endpoint for v2 (#7191) feat(core): add support for confirmation flow for click to pay (#6982) chore(version): 2025.02.20.0 fix(connector): [SCRIPT] Update template generating script and updated connector doc (#7301) ci(cypress): add assertions for `requires_cvv` (#7296) refactor(utils): match string for state with SDK's naming convention (#7300) feat(core): add hypersense integration api (#7218) chore(version): 2025.02.19.0 feat(connector): [Moneris] Add payments flow (#7249) ...
Type of Change
Description
Add support for confirmation flow for click to pay
currenlty in cick to pay we do authentication with mastercard and authorisation with adyen.
But to be prod certified mastercard needs a confirmation notification from hyperswitch after authorisation stating the state of the transaction.
So, in this Pr I have added confirmation flow for click to pay
How did you test it?
Add config to make the merchant eligible for authentication service
Create merchant connector account for Ctp_mastercard
Adyen
update business profile with ctp_mastercard mca_id
do payments create
do payments confirm
Expected Response
Reason for it being failed is ayden doesn't support click to pay in sandbox, but does support in production
Look for confirmation call in logs
Checklist
cargo +nightly fmt --all
cargo clippy