summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-merchant.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index e34dc7443..49ab63b19 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -69,6 +69,7 @@ import {
PrepareRefundResult,
randomBytes,
RefreshReason,
+ StartRefundQueryForUriResponse,
TalerError,
TalerErrorCode,
TalerErrorDetail,
@@ -2051,7 +2052,7 @@ async function processPurchaseAcceptRefund(
export async function startRefundQueryForUri(
ws: InternalWalletState,
talerUri: string,
-): Promise<void> {
+): Promise<StartRefundQueryForUriResponse> {
const parsedUri = parseTalerUri(talerUri);
if (!parsedUri) {
throw Error("invalid taler:// URI");
@@ -2070,7 +2071,15 @@ export async function startRefundQueryForUri(
if (!purchaseRecord) {
throw Error("no purchase found, can't refund");
}
- return startQueryRefund(ws, purchaseRecord.proposalId);
+ const proposalId = purchaseRecord.proposalId;
+ const transactionId = constructTransactionIdentifier({
+ tag: TransactionType.Payment,
+ proposalId,
+ });
+ await startQueryRefund(ws, proposalId);
+ return {
+ transactionId,
+ }
}
export async function startQueryRefund(