Skip to content

Commit

Permalink
realtime bugs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
issotina committed Jul 24, 2018
1 parent 1bcd173 commit 09cad0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/main/java/co/opensi/kkiapay/momo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ private fun request_payement(paymentRequest:PaymentRequest ,cb: (STATUS, String,
//server respond after transaction
val paymentStatus = Gson().fromJson<PaymentStatus>(it,PaymentStatus::class.java)
when(paymentStatus.isPaymentSucces){
true -> runOnUiThread { cb(STATUS.SUCCESS,paymentStatus.account,paymentRequest.transactionId) }
true -> runOnUiThread { cb(STATUS.SUCCESS,paymentStatus.account,paymentStatus.transactionId) }
false -> when(paymentStatus.failureCode) {
IS_INSUFFICIENT_FUND -> runOnUiThread { cb(STATUS.INSUFFICIENT_FUND,paymentStatus.account,paymentRequest.transactionId) }
else -> runOnUiThread { cb(STATUS.FAILED,paymentStatus.account,paymentRequest.transactionId) }
IS_INSUFFICIENT_FUND -> runOnUiThread { cb(STATUS.INSUFFICIENT_FUND,paymentStatus.account,paymentStatus.transactionId) }
else -> runOnUiThread { cb(STATUS.FAILED,paymentStatus.account,paymentStatus.transactionId) }
}
}

Expand Down

0 comments on commit 09cad0b

Please sign in to comment.