Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Pay - Testing from outside US

So I need to integrate Android Pay into an application I'm working on. This option within the app will be for US users only however I am in the UK and am having great difficulty trying to test my implementation. I'm using a sandbox Stripe account atm as the payment processor.

Once I press the "Pay with Android Pay" button I get a popup "To make purchases using Android Pay, please set up your cards in the Android Pay app". Now the Android Pay app isn't available outside the US so I've sideloaded it, however once I try to add a card it crashes. After a quick Google it seems like this crash is the apps way of saying it's not supported outside the US.. (Great UX btw)

I've also tried adding one of the cards found here, https://developers.google.com/android-pay/test-flows, to my Google Account however they don't show up in the Android Pay app.

I'm at a bit of loss trying to test this, it seems very much like Google has overlooked the fact developers outside the US would like to implement this in their apps for their US customers.

Does anyone have any ideas about how I can test this?

(Btw I'm testing on a stock, unrooted Nexus 5 running Marshmallow. I've also tried to spoof my location to no avail.)

EDIT: Spoke to Android Pay support who informed me there is no mechanism to test outside of the US. They said it checks your IP address to determine location which is why GPS spoofing doesn't work but it also seems proxies don't work either so unless anyone has hacked a way around this it looks like when they say US only they mean US only - Including development :|

like image 305
crazyfool Avatar asked Dec 01 '15 12:12

crazyfool


1 Answers

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.

enter image description here

  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
like image 104
Garima Mathur Avatar answered Nov 07 '22 16:11

Garima Mathur