juspay/hyperswitch

[TASK] Missing `payment_link` config in `docker_compose.toml` breaks SDK loading

開放

#9,324 建立於 2025年9月9日

 (3 則留言) (0 個反應) (1 位負責人)Rust (4,676 個分叉)batch import
good first issuehacktoberfest

倉庫指標

星標
 (42,690 顆星)
PR 合併指標
 (平均合併 6天 22小時) (30 天內合併 213 個 PR)

描述

Problem

The docker_compose.toml file is missing the following required block:

[payment_link]
sdk_url = "http://localhost:9050/HyperLoader.js"

Without this config, when generating payment links the SDK tries to fetch from https://beta.hyperswitch.io instead of the locally running backend. This results in failed payment_methods calls and the payment link not loading correctly for users.

Solution

Add the missing [payment_link] block to docker_compose.toml with the correct sdk_url pointing to the local service (http://localhost:9050/HyperLoader.js).

Expected Outcome

  • Payment links generated locally should correctly load the SDK from the configured local URL.
  • The payment_methods call should hit the backend specified in the hyperswitch-web service config instead of https://beta.hyperswitch.io.
  • Users should be able to open a generated payment link and see it working without SDK load failures.

Files to Modify

  • config/docker_compose.toml

Verification

  1. Run docker compose up
  2. Generate a payment link with:
    curl --location 'http://localhost:8081/payments' \
      --header 'Content-Type: application/json' \
      --header 'api-key: snd_5jYonmRK338pDuk1FqxSYfpPNutQUuVFEVV23qzpqzbQ4DYfbksIgdwIkgjb3vnP' \
      --data '{
          "amount": 100,
          "currency": "USD",
          "payment_link": true,
          "profile_id": "pro_ARVaflLlXRmGS5i8jfq5",
          "return_url": "http://www.google.com"
      }'
    
  3. Open the generated payment link in a browser
  4. Confirm that the SDK loads successfully and the payment_methods API call hits the local backend

貢獻者指南