-
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
refactor(router): changed payment method token TTL to api contract based config from const value #5115
Merged
Gnanasundari24
merged 17 commits into
main
from
5581-payment-link-fix-payment-token-expiry-bug-in-case-of-custom-expiration-more-than-15minutes
Jul 2, 2024
Merged
Conversation
This file contains 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
…sed config from const value
sahkal
added
A-core
Area: Core flows
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
A-payment-methods
Area: Payment Methods
labels
Jun 25, 2024
hyperswitch-bot
bot
added
the
M-api-contract-changes
Metadata: This PR involves API contract changes
label
Jun 25, 2024
…iness_create and business_update api's
…of-custom-expiration-more-than-15minutes' of https://github.com/juspay/hyperswitch into 5581-payment-link-fix-payment-token-expiry-bug-in-case-of-custom-expiration-more-than-15minutes
jarnura
requested changes
Jun 26, 2024
jarnura
reviewed
Jun 26, 2024
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.
LGTM
jarnura
previously approved these changes
Jun 27, 2024
Narayanbhat166
approved these changes
Jun 27, 2024
.contains(&intent_fulfillment_time) | ||
{ | ||
Err(errors::ApiErrorResponse::InvalidRequestData { | ||
message: "intent_fulfillment_time should be between 60(1 min) to 1800(30 mins)." |
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.
why is this value hard coded?
jarnura
approved these changes
Jun 27, 2024
…ug-in-case-of-custom-expiration-more-than-15minutes
Chethan-rao
approved these changes
Jun 27, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Jul 1, 2024
…ug-in-case-of-custom-expiration-more-than-15minutes
…ug-in-case-of-custom-expiration-more-than-15minutes
…ug-in-case-of-custom-expiration-more-than-15minutes
Gnanasundari24
deleted the
5581-payment-link-fix-payment-token-expiry-bug-in-case-of-custom-expiration-more-than-15minutes
branch
July 2, 2024 08:35
pixincreate
added a commit
that referenced
this pull request
Jul 3, 2024
…ror-handling-in-cypress * 'main' of github.com:juspay/hyperswitch: fix: realtime user analytics (#5129) refactor: use hashmap deserializer for generic_link options (#5157) refactor(router): changed payment method token TTL to api contract based config from const value (#5115) feat(router): collect billing details from wallet connector based on the `collect_billing_details_from_wallet_connector` field (#5065)
sahkal
restored the
5581-payment-link-fix-payment-token-expiry-bug-in-case-of-custom-expiration-more-than-15minutes
branch
July 4, 2024 11:24
sahkal
added a commit
that referenced
this pull request
Jul 4, 2024
…sed config from const value (#5115) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
6 tasks
SanchithHegde
removed
the
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
label
Jul 7, 2024
SanchithHegde
deleted the
5581-payment-link-fix-payment-token-expiry-bug-in-case-of-custom-expiration-more-than-15minutes
branch
July 7, 2024 17:15
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-core
Area: Core flows
A-payment-methods
Area: Payment Methods
M-api-contract-changes
Metadata: This PR involves API contract 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
Currently the payment method token TLL calculation was done based on
const::TOKEN_TTL - payment_intent.created_at
where TOKEN_TTL was 15mins, but as we have a new contract called
session_expiry
we can make our payment live for longer time constraint than just 15mins,due to this, the value
const::TOKEN_TTL - payment_intent.created_at
might go negative if the payment is done after 15mins. Which causes negative value at redis.To solve, This problem we have used
intent_fulfillment_time
in business profile which is set by the merchant.max value of
intent_fulfillment_time
can be 30mins and min can be 1minHow did you test it?
[Scenario 1] : Create a new business account
Create a merchant -> Create business profile with intent_fulfillment_time as 60s -> do payment connector step -> Create api key ->
Business Create
Do payment create with payment link
Do the payment after 60 seconds it should fail, with log as
[Scenario 2] : Update business account
Now Do update business profile
Now do payment link create
Now do
Pay now
after 3mins, it should passChecklist
cargo +nightly fmt --all
cargo clippy