forked from Mirrors/go-iap
Merge pull request #1 from bogdanconstantinescu/bogdanconstantinescu-patch-verify
gorequest wasn't sending the request for validation
This commit is contained in:
@@ -99,9 +99,15 @@ func NewWithConfig(config Config) Client {
|
|||||||
// Verify sends receipts and gets validation result
|
// Verify sends receipts and gets validation result
|
||||||
func (c *Client) Verify(req *IAPRequest) (IAPResponse, error) {
|
func (c *Client) Verify(req *IAPRequest) (IAPResponse, error) {
|
||||||
result := IAPResponse{}
|
result := IAPResponse{}
|
||||||
|
obj, err_json := json.Marshal(req)
|
||||||
|
if err_json != nil {
|
||||||
|
return result, fmt.Errorf("%v", err_json)
|
||||||
|
}
|
||||||
|
|
||||||
res, body, errs := gorequest.New().
|
res, body, errs := gorequest.New().
|
||||||
Post(c.URL).
|
Post(c.URL).
|
||||||
Send(req).
|
Type("json").
|
||||||
|
SendString(string(obj)).
|
||||||
Timeout(c.TimeOut).
|
Timeout(c.TimeOut).
|
||||||
End()
|
End()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user