请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

payment - Android Pay - Testing from outside US

[复制链接]
菜鸟教程小白 发表于 2022-6-22 22:05:19 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

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 :|



Best Answer-推荐答案


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
回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap