feat(payment-link): alternate text for manual captures
Type of Change
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Description
Payment links will have Add Payment Method as the button text in case of manual captures payments. Payment button text is localised and will have value according to locale used.
Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
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?
Curl:
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_MEIFMzxdOieBrD6NfMq5fkdKPlnh9EGSk4qgFWZ2Zv7cAR3eleriFFmTmJnfu2bI' \
--header 'Accept-Language: de' \
--data '{
"amount": 700,
"customer_id": "cus_5CPXeuPb98HjRkbQifzd",
"currency": "USD",
"payment_link": true,
"session_expiry": 1000000,
"return_url": "https://google.com",
"payment_link_config": {
"logo": "https://cdn.pixabay.com/photo/2021/08/28/08/48/deer-geface-6580415_1280.png",
"seller_name": "Cookie Inc."
}
}'
Checklist
- [x] I formatted the code
cargo +nightly fmt --all - [x] I addressed lints thrown by
cargo clippy - [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
Changed Files
| File | Status |
|---|---|
How to do it
Adrian
On Fri, Apr 25, 2025 at 6:17 AM likhinbopanna @.***> wrote:
Merged #7574 https://github.com/juspay/hyperswitch/pull/7574 into main.
— Reply to this email directly, view it on GitHub https://github.com/juspay/hyperswitch/pull/7574#event-17405601239, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJVKREALZJFCMMUZQOBEVYD23IRT7AVCNFSM6AAAAABZKU33I2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJXGQYDKNRQGEZDGOI . You are receiving this because you commented.Message ID: @.***>