-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(payment-link): alternate text for manual captures #7574
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
Changed Files
|
kashif-m
reviewed
Mar 19, 2025
crates/router/src/core/payment_link/payment_link_initiate/payment_link.js
Outdated
Show resolved
Hide resolved
4c46287
to
f796402
Compare
kashif-m
previously approved these changes
Mar 25, 2025
sahkal
previously approved these changes
Mar 25, 2025
Junjun13910
reviewed
Mar 30, 2025
crates/router/src/core/payment_link/payment_link_initiate/payment_link.js
Show resolved
Hide resolved
caba777
f796402
to
caba777
Compare
caba777
to
7f9afb2
Compare
sahkal
previously approved these changes
Apr 24, 2025
kashif-m
reviewed
Apr 24, 2025
8d21c90
to
a8b9748
Compare
kashif-m
approved these changes
Apr 25, 2025
if (paymentDetails.payment_button_text) { | ||
payNowButtonText.textContent = paymentDetails.payment_button_text; | ||
} else if (paymentDetails.is_setup_mandate_flow || (paymentDetails.amount==="0.00" && paymentDetails.setup_future_usage_applied ==="off_session")) { | ||
payNowButtonText.textContent = translations.addPaymentMethod; |
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.
Ideally we should compute in rust code and send the computed value to JS bro,
Let's refactor in the subsequent PR
sahkal
approved these changes
Apr 25, 2025
jagan-jaya
approved these changes
Apr 25, 2025
How to do it
Adrian
…On Fri, Apr 25, 2025 at 6:17 AM likhinbopanna ***@***.***> wrote:
Merged #7574 <#7574> into main.
—
Reply to this email directly, view it on GitHub
<#7574 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJVKREALZJFCMMUZQOBEVYD23IRT7AVCNFSM6AAAAABZKU33I2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJXGQYDKNRQGEZDGOI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This was
unlinked from
issues
May 6, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Payment links will have
Add Payment Method
as button text in case merchant send is_setup_mandate_flow astrue
in payment_link_config,Authorize Payment
in case of manual capture payments andPay Now
in automatic captures.is_setup_mandate_flow field is only used to alter the text in payment button our core flow of setup mandate remains the same i.e setup mandate flow is used only if amount is zero other authorize flow is used in payments core.
Priority given according to below:
Additional Changes
Motivation and Context
Payment links created with capture_method: manual - where the intention is to authorize the customer for some non zero amount, and capture the authorized amount at some later point in time. In such scenarios, the text Pay Now is incorrect as the user is not actually paying in that moment.
How did you test it?
Curls involved to test the flows:
Automatic captures:
Manual Captures:
setup_mandate_flow
setup_mandate_flow with zero amount
Checklist
cargo +nightly fmt --all
cargo clippy