mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
Tweak receipt check response
This commit is contained in:
parent
ebd5fce678
commit
5054462cad
1 changed files with 23 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue