diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-18 02:50:18 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-18 02:50:18 +0100 |
commit | 2f68e9e50e83c55ca46e9d4d72956d6525d0fa8c (patch) | |
tree | bfe94c2e0af1f3777765d37b35eeb76ed4e221be /src/webex/pages | |
parent | 82d9c2a7cd2e343866997438d44aa5422190a028 (diff) | |
download | wallet-core-2f68e9e50e83c55ca46e9d4d72956d6525d0fa8c.tar.xz |
fix handling of resource_url
Diffstat (limited to 'src/webex/pages')
-rw-r--r-- | src/webex/pages/confirm-contract.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/webex/pages/confirm-contract.tsx b/src/webex/pages/confirm-contract.tsx index c302239c6..cd58d712a 100644 --- a/src/webex/pages/confirm-contract.tsx +++ b/src/webex/pages/confirm-contract.tsx @@ -150,7 +150,7 @@ class ContractPrompt extends React.Component<ContractPromptProps, ContractPrompt if (this.props.resourceUrl) { const p = await wxApi.queryPaymentByFulfillmentUrl(this.props.resourceUrl); console.log("query for resource url", this.props.resourceUrl, "result", p); - if (p.found) { + if (p.found && (p.lastSessionSig === undefined || p.lastSessionSig === this.props.sessionId)) { const nextUrl = new URI(p.contractTerms.fulfillment_url); nextUrl.addSearch("order_id", p.contractTerms.order_id); if (p.lastSessionSig) { @@ -218,7 +218,9 @@ class ContractPrompt extends React.Component<ContractPromptProps, ContractPrompt console.error("proposal has no id"); return; } + console.log("confirmPay with", proposalId, "and", this.props.sessionId); const payResult = await wxApi.confirmPay(proposalId, this.props.sessionId); + console.log("payResult", payResult); document.location.href = payResult.nextUrl; this.setState({ holdCheck: true }); } |