Tweak receipt check response

This commit is contained in:
Andre Medeiros 2021-07-27 15:28:10 -04:00
parent ebd5fce678
commit 5054462cad

View file

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