-
-
Save hitherejoe/bfc728da963e3c59dda777f355861f8c 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
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