diff options
author | Iván Ávalos <avalos@disroot.org> | 2024-01-30 18:55:55 -0600 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2024-02-02 15:56:57 -0300 |
commit | f004af7b746a436e7317d5c27f8f261bd7a407f0 (patch) | |
tree | f9b4ad5b3fa40d4e53d5dd640439f3ae6bc02de8 /wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt | |
parent | 636b11b195cd250b96e7de4bea5fa32fc374d2a2 (diff) | |
download | taler-android-f004af7b746a436e7317d5c27f8f261bd7a407f0.tar.gz taler-android-f004af7b746a436e7317d5c27f8f261bd7a407f0.tar.bz2 taler-android-f004af7b746a436e7317d5c27f8f261bd7a407f0.zip |
[wallet] Redirect to details view after payment, deprecate proposalId, and remove pending op actions
bug 0008297
Diffstat (limited to 'wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt')
-rw-r--r-- | wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt b/wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt index 7e03472..5e97f58 100644 --- a/wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt +++ b/wallet/src/main/java/net/taler/wallet/payment/PaymentResponses.kt @@ -32,14 +32,14 @@ sealed class PreparePayResponse { @Serializable @SerialName("payment-possible") data class PaymentPossibleResponse( - val proposalId: String, + val transactionId: String, val amountRaw: Amount, val amountEffective: Amount, val contractTerms: ContractTerms, ) : PreparePayResponse() { fun toPayStatusPrepared() = PayStatus.Prepared( contractTerms = contractTerms, - proposalId = proposalId, + transactionId = transactionId, amountRaw = amountRaw, amountEffective = amountEffective, ) @@ -48,7 +48,6 @@ sealed class PreparePayResponse { @Serializable @SerialName("insufficient-balance") data class InsufficientBalanceResponse( - val proposalId: String, val amountRaw: Amount, val contractTerms: ContractTerms, ) : PreparePayResponse() @@ -56,13 +55,13 @@ sealed class PreparePayResponse { @Serializable @SerialName("already-confirmed") data class AlreadyConfirmedResponse( - val proposalId: String, + val transactionId: String, /** * Did the payment succeed? */ val paid: Boolean, val amountRaw: Amount, - val amountEffective: Amount, + val amountEffective: Amount? = null, val contractTerms: ContractTerms, ) : PreparePayResponse() } @@ -71,9 +70,15 @@ sealed class PreparePayResponse { sealed class ConfirmPayResult { @Serializable @SerialName("done") - data class Done(val contractTerms: ContractTerms) : ConfirmPayResult() + data class Done( + val transactionId: String, + val contractTerms: ContractTerms, + ) : ConfirmPayResult() @Serializable @SerialName("pending") - data class Pending(val lastError: TalerErrorInfo) : ConfirmPayResult() + data class Pending( + val transactionId: String, + val lastError: TalerErrorInfo, + ) : ConfirmPayResult() } |