fix: order will stay in queryRefund state forever
This commit is contained in:
parent
e263fe3508
commit
4f376297dc
@ -2685,6 +2685,15 @@ export async function processPurchaseQueryRefund(
|
|||||||
waitForAutoRefund,
|
waitForAutoRefund,
|
||||||
);
|
);
|
||||||
if (Amounts.isZero(awaitingAmount)) {
|
if (Amounts.isZero(awaitingAmount)) {
|
||||||
|
// Maybe the user wanted to check for refund to find out
|
||||||
|
// that there is no refund pending from merchant
|
||||||
|
await ws.db
|
||||||
|
.mktx((x) => [x.purchases])
|
||||||
|
.runReadWrite(async (tx) => {
|
||||||
|
purchase.purchaseStatus = PurchaseStatus.Paid;
|
||||||
|
await tx.purchases.put(purchase);
|
||||||
|
});
|
||||||
|
|
||||||
return OperationAttemptResult.finishedEmpty();
|
return OperationAttemptResult.finishedEmpty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user