Last active
October 30, 2019 15:37
-
-
Save deepak140596/609d6b34185f9691f3bc12db92e1f85e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PaymentActivity : AppCompatActivity(){ | |
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { | |
super.onActivityResult(requestCode, resultCode, data) | |
// Result Code is -1 send from Payumoney activity | |
log(D, "request code $requestCode resultcode $resultCode") | |
if (requestCode == PayUmoneyFlowManager.REQUEST_CODE_PAYMENT | |
&& resultCode == Activity.RESULT_OK && data != null) { | |
val transactionResponse = | |
data.getParcelableExtra<TransactionResponse>(PayUmoneyFlowManager.INTENT_EXTRA_TRANSACTION_RESPONSE) | |
if (transactionResponse?.getPayuResponse() != null) { | |
if (transactionResponse.transactionStatus == TransactionResponse.TransactionStatus.SUCCESSFUL) { | |
//Success Transaction. Do Work | |
log(E,"Success transaction") | |
} else { | |
//Failure Transaction. Notify user | |
log(E,"Failure transaction") | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment