Getting billing information for an android subscription?

I am using InAppBilling version 3 in my application, I can buy subscriptions with a test account. Now my question is how to find out the payment information in my application again for one tariff plan. Suppose I have a purchase of one plan and it updates the Daily, is there any provision or method to know that an update has been made for this product with details (for example, for product product_id, time, date, update, update_status etc.). I referred to this link.

And one more thing: can a user subscribe to multiple subscribers at the same time?

+3


source to share


1 answer


After a little searching, I finally found my solution. Google does not provide a subscription order number for test purchases (if you are using a test account to test your app without leaving production). It only exposes product_id, token, buy_time, developer_payload, autoRenewing, package_name and purchase_state , as if Google weren't submitting the details to the Play Billing server as this is not a real purchase. However, you can implement your own logic as it enforces autoRenewing = true (if the product is in an upgrade state) and false (if the product is in a non-upgrade state) with purchase_state = 0 (purchased).1 (canceled) and 2 (returned). And one more thing that I learned after reading the Google documentation is to test a user who rewrote subscriptions on a daily basis, but they will only receive the same data they receive when they buy a test subscription plan.



It provides an order ID for real purchases with other details. If your subscription is monthly and your order ID is GPA.1234-5678-9012-34567 when purchasing a plan. Then next month Google will add your order ID with GPA.1234-5678-9012-34567..0 (second month), GPA.1234-5678-9012-34567..1 (third month), etc. This way you can track the update of purchases using the order ID as described in here . The rest are the same.

+2


source







All Articles