forked from Mirrors/go-iap
Revert "gorequest wasn't sending the request for validation"
This reverts commit 2ed2786f8e.
This commit is contained in:
@@ -99,15 +99,9 @@ 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).
|
||||||
Type("json").
|
Send(req).
|
||||||
SendString(string(obj)).
|
|
||||||
Timeout(c.TimeOut).
|
Timeout(c.TimeOut).
|
||||||
End()
|
End()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user