diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-02 17:35:47 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-02 17:35:47 +0100 |
commit | b5ee6b7b4ee506712f51e1b90e9256c4b0c0c603 (patch) | |
tree | 7d8bb4398ab52b58a5223d37e058eaea6c72f963 /src/wallet-impl/pay.ts | |
parent | e1369ff7e8fc02116b9c4261036f0e42e3423cf4 (diff) | |
download | wallet-core-b5ee6b7b4ee506712f51e1b90e9256c4b0c0c603.tar.xz |
pending operations WIP
Diffstat (limited to 'src/wallet-impl/pay.ts')
-rw-r--r-- | src/wallet-impl/pay.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wallet-impl/pay.ts b/src/wallet-impl/pay.ts index d4d2b3cd4..31a1500ec 100644 --- a/src/wallet-impl/pay.ts +++ b/src/wallet-impl/pay.ts @@ -358,9 +358,14 @@ async function recordConfirmPay( } function getNextUrl(contractTerms: ContractTerms): string { - const fu = new URL(contractTerms.fulfillment_url) - fu.searchParams.set("order_id", contractTerms.order_id); - return fu.href; + const f = contractTerms.fulfillment_url; + if (f.startsWith("http://") || f.startsWith("https://")) { + const fu = new URL(contractTerms.fulfillment_url) + fu.searchParams.set("order_id", contractTerms.order_id); + return fu.href; + } else { + return f; + } } export async function abortFailedPayment( |