I'm trying to handle postbacks
with Google Wallet
but I'm unsure as to the best way to detect the type of postback
.
For example, how would I differentiate a Subscription Cancellation
vs a Subscription Sale
vs a One Time Purchase
?
I've read the Documentation: https://developers.google.com/wallet/digital/docs/postback
It's a little unclear as to the best method, as you only provide a single postback
URL for everything.
if($decoded_jwt->typ === "google/payments/inapp/subscription/v1/canceled") {
//Logic to handle cancel
}
Would this work in production? What would I use if it weren't a cancellation?
Thanks for any input!