Hello everyone,
I asked a question about expiration dates of Play Store subscriptions, and I got an answer saying that expiration date is included in ReceiptContent property. I tested the subscription feature in my game but I couldn't find expiryTimeMillis in the property.
https://community.playfab.com/questions/49619/play-store-receipt-validation-and-cancellation.html
I basically setup a rule that runs when a receipt is validated (player_receipt_validation). When it's called, I try to access the expiryTimeMillis variable in ReceiptContent property, but the variable is undefined.
Here's the code:
var content = JSON.parse(context.playStreamEvent.ReceiptContent); log.info("expiryTimeMillis: " + content["expiryTimeMillis"]);
Here's the receipt content and the log:
// Receipt Content "ReceiptContent": "{\"orderId\":\"GPA.xxxx-xxxx-xxxx-xxxxx\",\"packageName\":\"com.xxxxx.xxxxx\",\"productId\":\"item.badge.bronze\",\"purchaseTime\":1613218400006,\"purchaseState\":0,\"purchaseToken\":\"mhcecpofacjkgcadfemmjbfo.AO-J1OxRMggdQTkIDx1yukOqTSq54xZPrFZ_10iUhOOrz8BfmfHJZJEG7-yx7bOF5ODwuagPpi4DPThv16oQ4NOg6uB24l88o6L2zAMqYO4I9-fjAYuu4Qo\",\"autoRenewing\":true,\"acknowledged\":false}", // Log "expiryTimeMillis: undefined"