I am trying to implement the Google Pay payment method in my mobile application using Cybersource Payment gateway. I refer this example/tutorial for the reference and checked the implementation.
I configured the gateway name and merchant ID in the demo snippet and getting the success and Google Payment token in the success response. When i tried to implement the same code in my actual app I am getting the below error when I click on the Google Pay button.
Request failed ; Unexpected error has occured,Please try again later. [OR_BIBED_01]
I checked the log and found that i got the below exception in the logcat but unable to resolve it.
com.google.android.gms.common.api.ApiException: 10: at com.google.android.gms.common.api.internal.TaskUtil.setResultOrApiException(com.google.android.gms:play-services-base@@18.0.1:4) at com.google.android.gms.internal.wallet.zzy.zzc(com.google.android.gms:play-services-wallet@@19.1.0:1) at com.google.android.gms.internal.wallet.zzt.zza(com.google.android.gms:play-services-wallet@@19.1.0:33) at com.google.android.gms.internal.wallet.zzb.onTransact(com.google.android.gms:play-services-wallet@@19.1.0:3) at android.os.Binder.execTransactInternal(Binder.java:1021) at android.os.Binder.execTransact(Binder.java:994)
This error comes in the isReadyToPay()
method which check the availability of Google Pay. I am not able to understand that same code worked in the demo app/example and but not working in the my app.
I missed to add meta-data
tag in Android manifest file. Once i added, it start working.
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />