diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-29 16:41:17 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-29 16:41:17 +0100 |
commit | 1a66e232a55dff8c889e5554f637f4d4e475179c (patch) | |
tree | e02390f0edfecf5e925d44a71c62056060819886 /src/dbTypes.ts | |
parent | c8c03e381e252dc3a73a2c35bb1cd2ee24eeaabb (diff) | |
download | wallet-core-1a66e232a55dff8c889e5554f637f4d4e475179c.tar.xz |
implement aborting and getting refunds from failed payments
Diffstat (limited to 'src/dbTypes.ts')
-rw-r--r-- | src/dbTypes.ts | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/src/dbTypes.ts b/src/dbTypes.ts index 035c100a9..6c467ce74 100644 --- a/src/dbTypes.ts +++ b/src/dbTypes.ts @@ -31,8 +31,8 @@ import { CoinPaySig, ContractTerms, Denomination, + MerchantRefundPermission, PayReq, - RefundPermission, TipResponse, WireDetail, } from "./talerTypes"; @@ -762,9 +762,25 @@ export interface WireFee { * the customer accepts a proposal. Includes refund status if applicable. */ export interface PurchaseRecord { + /** + * Hash of the contract terms. + */ contractTermsHash: string; + + /** + * Contract terms we got from the merchant. + */ contractTerms: ContractTerms; + + /** + * The payment request, ready to be send to the merchant's + * /pay URL. + */ payReq: PayReq; + + /** + * Signature from the merchant over the contract terms. + */ merchantSig: string; /** @@ -773,8 +789,15 @@ export interface PurchaseRecord { */ finished: boolean; - refundsPending: { [refundSig: string]: RefundPermission }; - refundsDone: { [refundSig: string]: RefundPermission }; + /** + * Pending refunds for the purchase. + */ + refundsPending: { [refundSig: string]: MerchantRefundPermission }; + + /** + * Submitted refunds for the purchase. + */ + refundsDone: { [refundSig: string]: MerchantRefundPermission }; /** * When was the purchase made? @@ -788,8 +811,25 @@ export interface PurchaseRecord { */ timestamp_refund: number; + /** + * Last session id that we submitted to /pay (if any). + */ lastSessionSig: string | undefined; + + /** + * Last session signature that we submitted to /pay (if any). + */ lastSessionId: string | undefined; + + /** + * An abort (with refund) was requested for this (incomplete!) purchase. + */ + abortRequested: boolean; + + /** + * The abort (with refund) was completed for this (incomplete!) purchase. + */ + abortDone: boolean; } |