jnbt / candy_check

Check and verify in-app receipts
MIT License
125 stars 71 forks source link

SubscriptionPurchase for Google Receipts OrderId is Curtailed? #68

Closed NemyaNation closed 3 years ago

NemyaNation commented 3 years ago

The code:

receipt = PlayStore::SubscriptionVerifier.new.purchase_verifier(
    receipt_params["purchase_token"], 
    receipt_params["product_id"]
)
p receipt.subscription_purchase.order_id

outputs order_id => "GPA.1234-1234-1234-12345..1"

Emphasis on the .., it seems like it's sending back a shortened form of the order_id?

Can anyone confirm/alleviate my suspicions.

Kind regards, NemyaNation

NemyaNation commented 3 years ago

Just seen the Android Docs -> https://developer.android.com/google/play/billing/integrate

Order numbers for subscription renewals contain an additional integer that represents a specific renewal instance. For example, an initial subscription Order ID might be GPA.1234-5678-9012-34567 with subsequent Order IDs being GPA.1234-5678-9012-34567..0 (first renewal), GPA.1234-5678-9012-34567..1 (second renewal), and so on.

Seems like it's working as intended, can close issue now, thanks!

Kind regards, NemyaNation