android in-app billing sandbox

此生再无相见时 提交于 2019-11-29 19:49:31

问题


I'm developing a simple in-app billing library. It works with static responses from google, but now I'd like to test this lib with real in-app products.

I have created a test account and I'm trying to buy a product, but google Play is asking me for a credit card. Is there any way to test in-app billing without using a real credit card (a sandbox environment, fake credit card, etc)?

I have read here that the only way to test this is using a real credit card with a test account (so you don't have to pay google taxes) and once you have bought the product, refund it again, but it seems not to be a very 'developer-friendly' way.

Thanks.


回答1:


Nope it absolutely SUCKS

You have to use a real credit card, then go into Google Play , select View Merchant Account and hit the individual order then refund to get your money back.

sorry!




回答2:


As of today (or yesterday) Google has finally allowed "sandbox" testing of in app purchases, it goes through all the steps of an in app purchase except the actual charging of the credit card. Although you will probobly have to wait for the cancelations/refunds like you did before.

More info here and here

Got this info from my developers console.




回答3:


... and to add to Blundell's answer, it will take close to 6 hrs for refund to be posted, and then you'll probably want to give it another 6 hours before attempting the purchase.... or else.... Or else, what? Oh, I don't know, something like the "you already own this item" bug/glitch/bane of my existence




回答4:


You can test in-app purchase subscription using testing accounts. For reference please go through the link- You may use sandbox testing by adding you testers account to play console. Go to the play console main screen--> setting--> search for license testers--> add your testers email-id there. Then go to your app release-> go for your beta/alpha release. Tap on manage testers and share opt-in URL with testers to accept an invite.

https://cheesecakelabs.com/blog/google-play-iap-first-setup-test-sandbox/



来源:https://stackoverflow.com/questions/11243478/android-in-app-billing-sandbox

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