-
-
Save hitherejoe/80a5206f562a5ed00e7d5cc93273ced4 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
val request = IsReadyToPayRequest.fromJson(isReadyToPayRequest.toString()) | |
request?.let { | |
val task = paymentsClient?.isReadyToPay(request) | |
task?.addOnCompleteListener { completedTask -> | |
val result = completedTask.getResult(ApiException::class.java) | |
result?.let { | |
button_google_pay.setOnClickListener { view -> requestPayment(view) } | |
button_google_pay.visibility = View.VISIBLE | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment