Skip to content

Commit

Permalink
Push changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TpayDev committed Sep 3, 2024
1 parent 5579f55 commit fc36603
Show file tree
Hide file tree
Showing 746 changed files with 51 additions and 104,832 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.2.0
Add onPaymentCreated callback with transactionId

## 1.1.1
Fixed payment module results handling

Expand Down
1 change: 1 addition & 0 deletions android/src/main/kotlin/com/tpay/TpayMethodCallHandler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ class TpayMethodCallHandler(
val (type, value) = when (tpayResult) {
is TpayResult.ConfigurationSuccess -> CONFIGURATION_SUCCESS to null
is TpayResult.ValidationError -> VALIDATION_ERROR to tpayResult.message
is TpayResult.PaymentCreated -> PAYMENT_CREATED to tpayResult.transactionId
is TpayResult.PaymentCompleted -> PAYMENT_COMPLETED to tpayResult.transactionId
is TpayResult.PaymentCancelled -> PAYMENT_CANCELLED to tpayResult.transactionId
is TpayResult.TokenizationCompleted -> TOKENIZATION_COMPLETED to null
Expand Down
1 change: 1 addition & 0 deletions android/src/main/kotlin/com/tpay/TpayResult.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.tpay
sealed class TpayResult {
data class ValidationError(val message: String) : TpayResult()
object ConfigurationSuccess : TpayResult()
data class PaymentCreated(val transactionId: String?) : TpayResult()
data class PaymentCompleted(val transactionId: String?) : TpayResult()
data class PaymentCancelled(val transactionId: String?) : TpayResult()
object TokenizationCompleted : TpayResult()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class PaymentDelegateImpl(
private val sheet: ObservablePayment,
private val onResult: (TpayResult) -> Unit
) : PaymentDelegate {
override fun onPaymentCreated(transactionId: String?) { }
override fun onPaymentCreated(transactionId: String?) {
onResult(TpayResult.PaymentCreated(transactionId))
}

override fun onPaymentCompleted(transactionId: String?) {
onResult(TpayResult.PaymentCompleted(transactionId))
Expand Down
174 changes: 0 additions & 174 deletions doc/__404error.html

This file was deleted.

1 change: 0 additions & 1 deletion doc/categories.json

This file was deleted.

Loading

0 comments on commit fc36603

Please sign in to comment.