How to check if transaction is made with test account purchase or with real account purchase?

試著忘記壹切 提交于 2019-12-31 07:15:15

问题


I am making an In-app purchase test with test account but the response from google is same as the purchase made from real account. How to check if the purchase is test based on the response from google?


回答1:


Yes, you can check that from the purchaseType field of the Google's Purchases.subscriptions API response refer.

Field: purchaseType

Type: integer

Description: The type of purchase of the subscription. This field is only set if this purchase was not made using the standard in-app billing flow. Possible values are: 0 = Test (i.e. purchased from a license testing account)

As Google suggests, You have to develop a web server from where you can get a comprehensive list of fields. If you want to know more about the web server follow then refer to my this answer.



来源:https://stackoverflow.com/questions/55491833/how-to-check-if-transaction-is-made-with-test-account-purchase-or-with-real-acco

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