Minhaz Ahmed Syrus
e0fce7e253
Add missing notification verification fields
2020-09-16 12:43:46 +06:00
Junpei Tsuji
bb35e9f2a8
Handle http status 5xx error
2020-09-16 12:43:46 +06:00
sanjid133
47dd64806a
Verfiy latest receipt
2020-09-16 12:40:54 +06:00
sanjid133
9a16ac2219
Verfiy latest receipt
2020-09-16 12:31:45 +06:00
ashhadsheikh
cb6856d274
increase default timeout for client
...
Apple servers sometimes takes more than the default time causing client timeouts, increase the default timeout to cater increases response times.
2020-08-21 14:17:29 +05:00
kitakitabauer
51232bd52a
appstore: fix HandleError
2020-05-28 17:12:13 +09:00
Junpei Tsuji
9ba6e70200
Handle http status 5xx error
2020-02-20 14:52:46 +09:00
Junpei Tsuji
a61c519ac8
Fixed makefile
2020-02-20 13:02:14 +09:00
Sabrina
e54455a635
add mocks for appstore
2020-01-30 16:04:26 -08:00
Owen
46a2f52ca6
Return errors from JSON encode/decode
...
I found two JSON errors being shadowed; the one in amazon/validator.go
is being hidden by errors.New(responseError.Message) -- which should be
an empty string if there's a JSON error. So, it wouldn't report success,
but this gives the caller better information on what failed.
The second is in appstore/validator.go, which was ignoring encode errors
before POSTing a verify request.
2019-04-24 11:39:02 -04:00
micnncim
74773834e2
Add missing error handling
2019-03-11 18:21:25 +09:00
Junpei Tsuji
8e67f122c0
Added client timeout because http.DefaultClient doesn't have timeout
2018-05-18 12:31:19 +09:00
Junpei Tsuji
0cfabb49bb
Support context package when requesting AppStore
2018-05-17 13:37:16 +09:00
Junpei Tsuji
2a724a9d7c
Support custom client
2018-05-17 12:36:12 +09:00
Timothy Lock
6d00842743
Bring tests back up to 100%
...
Make a new method called parseResponse which essentially allows us to feed it our own response so that we can feed it bad body so that it cannot unmarshal or even read it.
2018-01-22 15:40:28 -05:00
Timothy Lock
fe51698284
Fix bug involving HttpStatusResponse
...
the `ok` in `r, ok := result.(*HttpStatusResponse)` would always fail unless the `result` being passed in was also of type `HttpStatusResponse`
2018-01-17 16:47:14 -05:00
Timothy Lock
132768c0fe
Use new struct to check status & Remove IAP_ENVIRONMENT
...
Use a new struct called `HttpStatusResponse` to check the status code returned in the receipt. This is ios-type independent and will redirect the receipt to sandbox if needed.
Following Apple's recommendation, always hit production and then sandbox. There is no more need to specify which environment to hit.
2018-01-17 16:02:52 -05:00
Timothy Lock
60800c1f90
Have app store hit prod and then sandbox if 21007
...
According to https://developer.apple.com/library/content/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-RECEIPTURL
Always verify your receipt first with the production URL; proceed to verify with the sandbox URL if you receive a 21007 status code. Following this approach ensures that you do not have to switch between URLs while your application is being tested or reviewed in the sandbox or is live in the App Store.
2017-12-11 17:05:53 -05:00
Yingjie Run
58b1c636fd
Remove iOS 6 style transaction receipt fields
2017-07-24 17:43:16 +08:00
Yingjie Run
2eb7bcf51a
append new IAP receipt fields
2017-07-20 18:20:07 +08:00
Austin George
f953f9abaa
Update IAPClient.Verify to use interface argument
2017-05-05 10:01:54 +02:00
Junpei Tsuji
ebac4ddf8d
Use http package instead of gorequest
2016-11-01 23:34:46 +09:00
Jumpei Tsuji
e9d5da1f8f
Use interface argument for IAP response instead of the library defined struct
2016-08-05 11:43:55 +09:00
Jumpei Tsuji
a32b701d7b
Removed redundant error handling
2016-07-28 18:05:27 +09:00
Jumpei Tsuji
c6384b927f
Golint and fixed a typo
2016-06-08 15:42:49 +09:00
Philip Vieira
0d43229ffb
Correct spelling mistake in AppStore errors
2016-05-18 15:50:48 +02:00
Jumpei Tsuji
5b7829b96a
Make url constants public
2015-03-30 21:00:25 +09:00
Bogdan Constantinescu
e55df6a60c
Removed pointer to IAPRequest
2015-02-24 21:53:29 +02:00
Bogdan Constantinescu
9379daa02b
Revert "gorequest wasn't sending the request for validation"
...
This reverts commit 2ed2786f8e .
2015-02-24 21:52:20 +02:00
Bogdan Constantinescu
2ed2786f8e
gorequest wasn't sending the request for validation
...
In the gorequest Send method, there is a switch that checks the type of the parameter (https://github.com/parnurzeal/gorequest/blob/master/main.go#L341 ). In this particular case, the type of *IAPRequest is "ptr" which results in gorequest's switch to go the default case which is empty. The request was made with an empty body.
2015-02-20 16:54:19 +02:00
tsuji_jumpei
99e9a4e759
Added the subscription validator for in app billing
2014-12-05 01:59:36 +09:00
tsuji_jumpei
1f1601cd3c
Initial push
2014-12-04 21:08:46 +09:00