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) }