-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus #8096
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Flows & Added new variants in AttemptStatus & IntentStatus
deepanshu-iiitu
requested changes
May 22, 2025
crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
Outdated
Show resolved
Hide resolved
sahkal
reviewed
May 23, 2025
crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
Outdated
Show resolved
Hide resolved
sahkal
reviewed
Jun 2, 2025
deepanshu-iiitu
requested changes
Jun 9, 2025
crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs
Outdated
Show resolved
Hide resolved
deepanshu-iiitu
requested changes
Jun 9, 2025
srujanchikke
previously approved these changes
Jun 9, 2025
deepanshu-iiitu
previously approved these changes
Jun 10, 2025
Comment on lines
11
to
14
AttemptStatus::Authorized | ||
| AttemptStatus::Charged | ||
| AttemptStatus::AutoRefunded | ||
| AttemptStatus::IntegrityFailure => Self::Succeeded, |
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 we can change to InvalidStatus, Since merchant intervention is needed anyway, Process tracker also we will be stopped to avoid other recovery retries.
cc : @Aprabhat19
deepanshu-iiitu
approved these changes
Jun 10, 2025
Chethan-rao
approved these changes
Jun 10, 2025
sahkal
approved these changes
Jun 10, 2025
pixincreate
added a commit
that referenced
this pull request
Jun 10, 2025
…ordea-sepa * 'main' of github.com:juspay/hyperswitch: (63 commits) feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus (#8096) fix(connector): [STRIPE] Throwing Missing Required Field Error if connector_customer is not present (#8309) refactor(connectors): [worldpayvantiv] replace sandbox url with pre-live url and fix typo (#8286) fix: payment link styling for dynamic classes (#8273) feat(core): Make installment_payment_enabled,recurring_enabled Optional (#8201) fix(cypress): fix itaubank, datatrans and facilitapay (#8229) fix(connector): [jpmorgan] 5xx during payment authorize and `cancellation_reason` (#8282) revert(connector): [Worldpay] add root CA certificate (#8224) ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209) fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183) chore(version): 2025.06.10.0 feat(tokenio): Add OpenBanking Redirection Flow (#8152) fix: Unified scarf setup (#8238) feat(health): Health check for Decision engine (#8243) chore: Update apple pay currency filter configs (#8217) refactor(customers_v2): Remove merchant reference id from v2 customer update (#7879) chore(version): 2025.06.09.0 chore(postman): update Postman collection files ci(postman): add tunnel collection to postman tests (#8269) feat(connector): Added recurring payments support for split payments in Stripe (#8271) ...
pixincreate
added a commit
that referenced
this pull request
Jun 10, 2025
…ordea-sepa * 'main' of github.com:juspay/hyperswitch: (63 commits) feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus (#8096) fix(connector): [STRIPE] Throwing Missing Required Field Error if connector_customer is not present (#8309) refactor(connectors): [worldpayvantiv] replace sandbox url with pre-live url and fix typo (#8286) fix: payment link styling for dynamic classes (#8273) feat(core): Make installment_payment_enabled,recurring_enabled Optional (#8201) fix(cypress): fix itaubank, datatrans and facilitapay (#8229) fix(connector): [jpmorgan] 5xx during payment authorize and `cancellation_reason` (#8282) revert(connector): [Worldpay] add root CA certificate (#8224) ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209) fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183) chore(version): 2025.06.10.0 feat(tokenio): Add OpenBanking Redirection Flow (#8152) fix: Unified scarf setup (#8238) feat(health): Health check for Decision engine (#8243) chore: Update apple pay currency filter configs (#8217) refactor(customers_v2): Remove merchant reference id from v2 customer update (#7879) chore(version): 2025.06.09.0 chore(postman): update Postman collection files ci(postman): add tunnel collection to postman tests (#8269) feat(connector): Added recurring payments support for split payments in Stripe (#8271) ...
pixincreate
added a commit
that referenced
this pull request
Jun 10, 2025
… into trustpay-banktransfer * 'trustpay-banktransfer' of github.com:juspay/hyperswitch: feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus (#8096) fix(connector): [STRIPE] Throwing Missing Required Field Error if connector_customer is not present (#8309) refactor(connectors): [worldpayvantiv] replace sandbox url with pre-live url and fix typo (#8286) fix: payment link styling for dynamic classes (#8273) feat(core): Make installment_payment_enabled,recurring_enabled Optional (#8201) fix(cypress): fix itaubank, datatrans and facilitapay (#8229) fix(connector): [jpmorgan] 5xx during payment authorize and `cancellation_reason` (#8282) revert(connector): [Worldpay] add root CA certificate (#8224) ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209) fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183) chore(version): 2025.06.10.0
bsayak03
added a commit
that referenced
this pull request
Jun 11, 2025
…flows & Added New Variants in AttemptStatus & IntentStatus (#8096) Co-authored-by: Sayak Bhattacharya <[email protected]> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sahkal Poddar <[email protected]>
bsayak03
added a commit
that referenced
this pull request
Jun 11, 2025
…flows & Added New Variants in AttemptStatus & IntentStatus (#8096) Co-authored-by: Sayak Bhattacharya <[email protected]> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sahkal Poddar <[email protected]>
14 tasks
14 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
M-api-contract-changes
Metadata: This PR involves API contract changes
M-database-changes
Metadata: This PR involves database schema changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
Added Integrity Checks for PSync and RSync flows in Trustpay.
Why not for other flows as well?
The reason being, Trustpay doesnt send
amount
field in their response. Without getting to know theamount
, we cannot perform integrity check. But they do send anamount
field in Webhooks, so it will be checked upon receiving the webhooks payload.Also added a function which converts f64 to StringMajorUnit directly because there wasn't any function already which does it. We needed this function to convert the amount being received in f64 from Webhooks into StringMajorUnit which is required for the integrity check function.
Also added new enum variants in AttemptStatus and IntentStatus. In AttemptStatus added an enum variant "IntegrityFailure" and in IntentStatus added an enum variant "Conflicted".
Additional Changes
Motivation and Context
How did you test it?
Note: Since we donot have the Trustpay Dashboard access for SEPA Bank Transfer payment method hence we are sending the webhook payload by ourselves and thereby adding a function inside impl IncomingWebhooks so that the source verification becomes true.
Step 1: Do a Payments - Create (3DS)
cURL :
We will get a status of
requires_customer_action
and upon getting redirected we will complete the payment and get a status ofprocessing
upon doing a PSync.PSync cURL :
Response:
Once the status gets to 'suceedeed` and we receive webhooks and if there's a discrepency between the amount sent and amount sent to the connector, we receive this
Webhook Payload :
Response:
Checklist
cargo +nightly fmt --all
cargo clippy