diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-20 14:56:22 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-20 14:56:22 +0530 |
commit | ddf9171c5becb3bb1aebdd3e1a298644f62ed090 (patch) | |
tree | a34226a2ea4f8dda8a2a8196d96d2692e00911ab /packages/taler-wallet-core | |
parent | a8fb16021d6f71e6d0c7fae6b440e5c3197b8867 (diff) | |
download | wallet-core-ddf9171c5becb3bb1aebdd3e1a298644f62ed090.tar.xz |
add another test case for the merchant refund API
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay.ts | 3 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/types/walletTypes.ts | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index 327a6c804..565fe9c66 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -1052,6 +1052,7 @@ export async function preparePayForUri( return { status: PreparePayResultType.AlreadyConfirmed, contractTerms: JSON.parse(purchase.contractTermsRaw), + contractTermsHash: purchase.contractData.contractTermsHash, paid: true, nextUrl: r.nextUrl, amountRaw: Amounts.stringify(purchase.contractData.amount), @@ -1061,6 +1062,7 @@ export async function preparePayForUri( return { status: PreparePayResultType.AlreadyConfirmed, contractTerms: JSON.parse(purchase.contractTermsRaw), + contractTermsHash: purchase.contractData.contractTermsHash, paid: false, amountRaw: Amounts.stringify(purchase.contractData.amount), amountEffective: Amounts.stringify(purchase.payCostInfo.totalCost), @@ -1070,6 +1072,7 @@ export async function preparePayForUri( return { status: PreparePayResultType.AlreadyConfirmed, contractTerms: JSON.parse(purchase.contractTermsRaw), + contractTermsHash: purchase.contractData.contractTermsHash, paid, amountRaw: Amounts.stringify(purchase.contractData.amount), amountEffective: Amounts.stringify(purchase.payCostInfo.totalCost), diff --git a/packages/taler-wallet-core/src/types/walletTypes.ts b/packages/taler-wallet-core/src/types/walletTypes.ts index 511d7766c..921c63a1e 100644 --- a/packages/taler-wallet-core/src/types/walletTypes.ts +++ b/packages/taler-wallet-core/src/types/walletTypes.ts @@ -422,6 +422,7 @@ export const codecForPreparePayResultAlreadyConfirmed = (): Codec< .property("nextUrl", codecForString()) .property("paid", codecForBoolean) .property("contractTerms", codecForAny()) + .property("contractTermsHash", codecForString()) .build("PreparePayResultAlreadyConfirmed"); export const codecForPreparePayResult = (): Codec<PreparePayResult> => @@ -469,6 +470,8 @@ export interface PreparePayResultAlreadyConfirmed { amountEffective: string; // Only specified if paid. nextUrl?: string; + + contractTermsHash: string; } export interface BankWithdrawDetails { |