diff options
author | Sebastian <sebasjm@gmail.com> | 2023-07-03 12:40:35 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-07-03 12:40:35 -0300 |
commit | f47b5bd783def7481233f94275e333365d50b08b (patch) | |
tree | 26fda24f36c02cce2c2aed6a937ec315e1a47615 /packages/taler-util/src/wallet-types.ts | |
parent | 15a15942d2160e7742ccb415554c87057da7afc2 (diff) | |
download | wallet-core-f47b5bd783def7481233f94275e333365d50b08b.tar.xz |
#7741 share payment
add shared flag in db
new state purchase dialogShared
new error WALLET_ORDER_ALREADY_PAID
removing nonce from normal operation
new operation: sharePayment which returns payUri with nonce
Diffstat (limited to 'packages/taler-util/src/wallet-types.ts')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 66b5e7262..7926cdd4f 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -684,7 +684,6 @@ export const codecForPreparePayResultPaymentPossible = .property("proposalId", codecForString()) .property("contractTermsHash", codecForString()) .property("talerUri", codecForString()) - .property("noncePriv", codecForString()) .property( "status", codecForConstString(PreparePayResultType.PaymentPossible), @@ -757,7 +756,6 @@ export const codecForPreparePayResultInsufficientBalance = .property("talerUri", codecForString()) .property("proposalId", codecForString()) .property("transactionId", codecForTransactionIdStr()) - .property("noncePriv", codecForString()) .property( "status", codecForConstString(PreparePayResultType.InsufficientBalance), @@ -775,7 +773,7 @@ export const codecForPreparePayResultAlreadyConfirmed = "status", codecForConstString(PreparePayResultType.AlreadyConfirmed), ) - .property("amountEffective", codecForAmountString()) + .property("amountEffective", codecOptional(codecForAmountString())) .property("amountRaw", codecForAmountString()) .property("paid", codecForBoolean()) .property("talerUri", codecOptional(codecForString())) @@ -824,7 +822,6 @@ export interface PreparePayResultPaymentPossible { contractTermsHash: string; amountRaw: string; amountEffective: string; - noncePriv: string; talerUri: string; } @@ -834,7 +831,6 @@ export interface PreparePayResultInsufficientBalance { proposalId: string; contractTerms: MerchantContractTerms; amountRaw: string; - noncePriv: string; talerUri: string; balanceDetails: PayMerchantInsufficientBalanceDetails; } @@ -845,7 +841,7 @@ export interface PreparePayResultAlreadyConfirmed { contractTerms: MerchantContractTerms; paid: boolean; amountRaw: string; - amountEffective: string; + amountEffective: string | undefined; contractTermsHash: string; proposalId: string; talerUri?: string; @@ -1724,6 +1720,24 @@ export const codecForPreparePayRequest = (): Codec<PreparePayRequest> => .property("talerPayUri", codecForString()) .build("PreparePay"); +export interface SharePaymentRequest { + merchantBaseUrl: string; + orderId: string; +} +export const codecForSharePaymentRequest = (): Codec<SharePaymentRequest> => + buildCodecForObject<SharePaymentRequest>() + .property("merchantBaseUrl", codecForString()) + .property("orderId", codecForString()) + .build("SharePaymentRequest"); + +export interface SharePaymentResult { + privatePayUri: string; +} +export const codecForSharePaymentResult = (): Codec<SharePaymentResult> => + buildCodecForObject<SharePaymentResult>() + .property("privatePayUri", codecForString()) + .build("SharePaymentResult"); + export interface PreparePayTemplateRequest { talerPayTemplateUri: string; templateParams: Record<string, string>; |