[Snippet rust]
```rust
fn get_js_script(payment_details: &PaymentLinkData) -> RouterResult<String> {
    let payment_details_str = serde_json::to_string(payment_details)
        .change_context(errors::ApiErrorResponse::InternalServerError)
        .attach_printable("Failed to serialize PaymentLinkData")?;
    let url_encoded_str = urlencoding::encode(&payment_details_str);
```
Path: hyperswitch/crates/router/src/core/payment_link.rs :: get_js_script (function, crate=router)

Negatives:
- hyperswitch/crates/payment_methods/src/configs/payment_connector_required_fields.rs :: billing_email_billing_name_phone
- hyperswitch/crates/router/src/routes/user.rs :: invite_multiple_user
- hyperswitch/crates/hyperswitch_connectors/src/connectors/threedsecureio/transformers.rs :: try_from
- hyperswitch/crates/hyperswitch_connectors/src/connectors/archipel.rs :: get_content_type
- hyperswitch/crates/hyperswitch_connectors/src/connectors/nordea.rs :: get_error_response