Skip to content

Instantly share code, notes, and snippets.

@hitherejoe
Created May 26, 2016
Embed
What would you like to do?
Wallet.Payments.isReadyToPay(mGoogleApiClient).setResultCallback(
new ResultCallback<BooleanResult>() {
@Override
public void onResult(@NonNull BooleanResult payEnabled) {
if (payEnabled.getStatus().isSuccess()) {
if (payEnabled.getValue()) {
// Woo! Android pay is enabled, lets show that Android Pay
// button and hide the standard checkout button!
} else {
// Unfortunately the user doesn't have Android Pay enabled,
// so hide the button and display the standard checkout button
}
} else {
// Looks like there was an error making the isReadyPay method call...
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment