Skip to content

Instantly share code, notes, and snippets.

@hitherejoe hitherejoe/request_payment.kt Secret
Last active Jan 3, 2019

What would you like to do?
val request = IsReadyToPayRequest.fromJson(isReadyToPayRequest.toString())
request?.let {
val task = paymentsClient?.isReadyToPay(request)
task?.addOnCompleteListener { completedTask ->
val result = completedTask.getResult(
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
You can’t perform that action at this time.