mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
Root cause: invokeProvider used the registry's provider (created once at startup from an arbitrary instance) instead of the selected instance's config. This meant payments always used one instance's credentials regardless of which instance was selected. Fix: create a fresh provider from the selected instance's decrypted config for each payment call, ensuring correct credentials (PID, PKey, CID, Stripe keys, etc.). Also fix SelectInstance for Stripe: when paymentType equals providerKey (e.g. "stripe"), all instances of that provider are candidates. The DB stores sub-types (card,alipay,wxpay,link) not "stripe" itself.