From 5054462cadee42fe3dbfd695c36006ecff21cdf3 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Tue, 27 Jul 2021 15:28:10 -0400 Subject: [PATCH] Tweak receipt check response --- internal/api/receipt.go | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/internal/api/receipt.go b/internal/api/receipt.go index b623b57..c78ac19 100644 --- a/internal/api/receipt.go +++ b/internal/api/receipt.go @@ -6,7 +6,29 @@ import ( "github.com/julienschmidt/httprouter" ) +const receiptResponse = `{ + "products": [ + { + "name": "ultra", + "status": "SANBOX", + "subscription_type": "SANDBOX" + }, + { + "name": "pro", + "status": "SANDBOX" + }, + { + "name": "community_icons", + "status": "SANDBOX" + }, + { + "name": "spca", + "status": "SANDBOX" + } + ] +}` + func (a *api) checkReceiptHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { - w.Write([]byte(`{"status_code": 11, "status_message": "Receipt is valid, lifetime subscription", "subscription_type": "lifetime"}`)) + w.Write([]byte(receiptResponse)) w.WriteHeader(http.StatusOK) }