diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
| -rw-r--r-- | packages/taler-wallet-core/src/operations/pay-merchant.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts index f8fa1d34d..496641fe7 100644 --- a/packages/taler-wallet-core/src/operations/pay-merchant.ts +++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts @@ -57,6 +57,7 @@ import { MerchantCoinRefundStatus, MerchantCoinRefundSuccessStatus, MerchantContractTerms, + MerchantPayResponse, NotificationType, parsePayUri, parseRefundUri, @@ -605,6 +606,7 @@ async function startDownloadProposal( timestampFirstSuccessfulPay: undefined, timestampLastRefundStatus: undefined, pendingRemovedCoinPubs: undefined, + posConfirmation: undefined, }; await ws.db @@ -629,7 +631,7 @@ async function storeFirstPaySuccess( ws: InternalWalletState, proposalId: string, sessionId: string | undefined, - paySig: string, + payResponse: MerchantPayResponse, ): Promise<void> { const now = AbsoluteTime.toTimestamp(AbsoluteTime.now()); await ws.db @@ -651,7 +653,8 @@ async function storeFirstPaySuccess( } purchase.timestampFirstSuccessfulPay = now; purchase.lastSessionId = sessionId; - purchase.merchantPaySig = paySig; + purchase.merchantPaySig = payResponse.sig; + purchase.posConfirmation = payResponse.pos_confirmation; const dl = purchase.download; checkDbInvariant(!!dl); const contractTermsRecord = await tx.contractTerms.get( @@ -1529,7 +1532,7 @@ export async function processPurchasePay( throw Error("merchant payment signature invalid"); } - await storeFirstPaySuccess(ws, proposalId, sessionId, merchantResp.sig); + await storeFirstPaySuccess(ws, proposalId, sessionId, merchantResp); await unblockBackup(ws, proposalId); } else { const payAgainUrl = new URL( |
