fix(payment_link): move redirection fn to global scope for open links #5494
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
Described in #5495
Additional Changes
How did you test it?
1. Create non 3DS open payment link
curl --location 'https://sandbox.hyperswitch.io/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: API_KEY' \ --data-raw '{ "customer_id": "cus_05845u0qSuOENDnHLqTl", "amount": 100, "currency": "USD", "payment_link": true, "authentication_type": "no_three_ds", "connector": [ "stripe" ], "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "email": "john.doe@example.com", "session_expiry": 1000000, "return_url": "https://google.com", "payment_link_config": { "theme": "#14356f", "logo": "https://hyperswitch.io/favicon.ico", "seller_name": "HyperSwitch Inc." } }'Complete the payment, and wait for redirection
Checklist
cargo +nightly fmt --all
cargo clippy