Bug: [BUG] secure payment links don't render



### Bug Description

Secure payment links are not instantiating and rendering the checkout widget.

### Expected Behavior

Secure payment links should render the checkout widget.

### Actual Behavior

Secure payment links are breaking the functionality.

### Steps To Reproduce

- Whitelist `allowed_domains` in `payment_link_config`
- Create a payment link
- Open secure links

### Context For The Bug

-

### Environment

Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the `x-request-id` response header to help us debug your issue.

If not (or if building/running locally), please provide the following details:
1. Operating System or Linux distribution:
2. Rust version (output of `rustc --version`): ``
3. App version (output of `cargo r --features vergen -- --version`): ``


### Have you spent some time checking if this bug has been raised before?

- [x] I checked and didn't find a similar issue

### Have you read the Contributing Guidelines?

- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)

### Are you willing to submit a PR?

Yes, I am willing to submit a PR!
diff --git a/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js b/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js
index c539363c102..3a9e7f60336 100644
--- a/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js
+++ b/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js
@@ -30,7 +30,8 @@ if (!isFramed) {
    **/
   function initializeSDK() {
     // @ts-ignore
-    var paymentDetails = window.__PAYMENT_DETAILS;
+    var encodedPaymentDetails = window.__PAYMENT_DETAILS;
+    var paymentDetails = decodeUri(encodedPaymentDetails);
     var clientSecret = paymentDetails.client_secret;
     var sdkUiRules = paymentDetails.sdk_ui_rules;
     var labelType = paymentDetails.payment_form_label_type;

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
This PR fixes the bug where the encoded payment link details were being read without decoding them first.

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
Fixes usage of secure payment links.

## How did you test it?
Locally by creating secure payment links.


<details>
    <summary>1. Update allowed domains in payment link config</summary>

cURL

    curl --location --request POST 'https://sandbox.hyperswitch.io/account/merchant_1681193734270/business_profile/pro_E7pM8kGERopEKEhqwfWQ' \
        --header 'Content-Type: application/json' \
        --header 'api-key: dev_001otYWH3kG1v2SYexBXbt7AwbGQx8lK18wdsAmDvxtKVVLbBupRICLt6Styqadq' \
        --data '{
            "payment_link_config": {
                "theme": "#003264",
                "allowed_domains": [
                    "localhost:5000",
                    "http://localhost:5500",
                    "localhost:5500",
                    "http://localhost:5000",
                    "http://localhost:5501",
                    "localhost:5501",
                    "http://127.0.0.1:5501",
                    "127.0.0.1:5501"
                ],
                "branding_visibility": false
            }
        }'

</details>


<details>
    <summary>2. Create a payment link</summary>

cURL

    curl --location --request POST 'https://sandbox.hyperswitch.io/payments' \
        --header 'Content-Type: application/json' \
        --header 'Accept: application/json' \
        --header 'Accept-Language: de' \
        --header 'api-key: dev_001otYWH3kG1v2SYexBXbt7AwbGQx8lK18wdsAmDvxtKVVLbBupRICLt6Styqadq' \
        --data-raw '{
            "customer_id": "cus_CDei4NEhboFFubgAxsy8",
            "customer_acceptance": {
                "acceptance_type": "online",
                "accepted_at": "1963-05-03T04:07:52.723Z",
                "online": {
                    "ip_address": "127.0.0.1",
                    "user_agent": "amet irure esse"
                }
            },
            "setup_future_usage": "off_session",
            "amount": 100,
            "currency": "EUR",
            "confirm": false,
            "payment_link": true,
            "session_expiry": 7890000,
            "billing": {
                "address": {
                    "line1": "1467",
                    "line2": "Harrison Street",
                    "line3": "Harrison Street",
                    "zip": "94122",
                    "country": "IT",
                    "first_name": "John",
                    "last_name": "Doe"
                },
                "phone": {
                    "number": "8056594427",
                    "country_code": "+91"
                },
                "email": "random@juspay.in"
            },
            "return_url": "https://www.example.com"
        }'

Response

    {"payment_id":"pay_6tphveQF5TmCQO90G05r","merchant_id":"merchant_1756818611","status":"requires_payment_method","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"pay_6tphveQF5TmCQO90G05r_secret_VUlaPQSpKYZWGwCpGBI4","created":"2025-09-03T10:38:39.889Z","currency":"EUR","customer_id":"cus_Ey5nUuS0S4R2xds9t51K","customer":{"id":"cus_Ey5nUuS0S4R2xds9t51K","name":"John Doe","email":"abc@example.com","phone":"999999999","phone_country_code":"+65"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":null,"payment_method":null,"payment_method_data":null,"payment_token":null,"shipping":null,"billing":{"address":{"city":null,"country":"IT","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":null,"first_name":"John","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"random@juspay.in"},"order_details":null,"email":"abc@example.com","name":"John Doe","phone":"999999999","return_url":"https://www.example.com/","authentication_type":null,"statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_Ey5nUuS0S4R2xds9t51K","created_at":1756895919,"expires":1756899519,"secret":"epk_a9551c5842a04d8cbd9eb0213ea5790d"},"manual_retry_allowed":null,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":{"link":"http://localhost:8080/payment_link/merchant_1756818611/pay_6tphveQF5TmCQO90G05r?locale=de","secure_link":"http://localhost:8080/payment_link/s/merchant_1756818611/pay_6tphveQF5TmCQO90G05r?locale=de","payment_link_id":"plink_KZjExI8gP8BP0pRGVaI9"},"profile_id":"pro_GlXrXUKHbckWzGnidhzV","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-12-03T18:18:39.883Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-03T10:38:39.911Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":null,"force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null}

</details>


<details>
    <summary>3. Open in an iframe</summary>

HTML

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>Document</title>
            <style>
                html, body {
                    margin: 0;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background-color: black;
                    height: 100vh;
                    width: 100vw;
                }
                iframe {
                    border-radius: 4px;
                    height: 90vh;
                    width: 90vw;
                    background-color: white;
                }

            </style>
        </head>
        <body>
            <iframe
                allow="payment"
                src="http://localhost:8080/payment_link/s/merchant_1756818611/pay_5NZOVfi2G1Xg856uyTCZ?locale=de"
                frameborder="0"></iframe>
        </body>
    </html>

<img width="860" height="840" alt="Screenshot 2025-09-03 at 4 18 58 PM" src="https://github.com/user-attachments/assets/990d25a1-cb4c-4049-bc60-78f9a2232047" />

</details>


## Checklist
<!-- Put an `x` in the boxes that apply -->

- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
