Android Pay - Testing from outside US

一世执手 提交于 2019-11-28 19:53:13

Follow these steps to convert Android pay into testable environment

  1. Install Android Pay apk from apkmirror website. Make sure you use correct apk variant. http://www.apkmirror.com/apk/google-inc/android-pay/

or

  1. You can use TunnelBear(Change VPN) App to download Android Pay App in India https://play.google.com/store/apps/details?id=com.tunnelbear.android

  2. Turn on Sandbox Mode by executing following commands from command prompt:

    adb shell
    cd /sdcard/Download;
    rm ­-f android_pay_env_override_*;
    touch android_pay_env_override_sandbox;
    
  3. Restart the phone

    • Launch the Android Pay app and add following test credit card details:

    • Card Number: 4622 9431 2999 9943 Expiry: 12/17 CVV: 125

    • Enter other details like address and proceed.

    • Card is added successfully.

  1. Use ENVIRONMENT_SANDBOX to integrate and test Android Pay in your app.

  2. Revert from Sandbox to Production by executing following commands from command prompt:

    adb shell
    cd /sdcard/Download;
    rm -­f android_pay_env_override_*;
    
  3. Restart phone

  4. Use ENVIRONMENT_PRODUCTION or ENVIRONMENT_TEST to integrate and test Android Pay in your app

I had similar issues to what you describe, but I managed to get it working from Canada. One of the changes I had to make was to use WalletConstants.ENVIRONMENT_TEST instead of the deprecated WalletConstants.ENVIRONMENT_STAGING (the latter was mentioned in almost all tutorials and examples). I also had misconfigured the PaymentMethodTokenizationParameters on the MaskedWalletRequest.

If you are still having issues with your implementation please post the code and I can take a look.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!