Hello, I got mail from apple. https://itunespartner.apple.com/en/apps/news/45333106?sc_cid=NSL-AP-ENREC It seems apple improves the possibilties to handle subscriptions. Is it possible to use these informations in b4i. Can someone give my a hint how to get this.
The JSON contents you submit with the request to the App Store.
developer.apple.com
I'm trying to communicate with apple's sanbox server from my VPS with code like below
Still gettins 21002 that means: The data in the receipt-data property was malformed or the service experienced a temporary issue. Try again (obwiously request is not-well formed)
Any help appreciated.
B4X:
Private Sub DownloadApple (numer As String)
Dim B64 As Base64
Dim url As String = "https://sandbox.itunes.apple.com/verifyReceipt"
Dim Job As HttpJob
Job.Initialize("fcm", Me)
Dim m As Map
m.Initialize
m.put ("receipt-data", B64.EncodeStoB( numer,"UTF8"))
m.put("password", SubskrypcjaSPLKluczAPPLE)
Dim jg As JSONGenerator
jg.Initialize(m)
Job.PostString(url, jg.ToString)
Job.GetRequest.SetContentType("application/json")
End Sub
before sending code to forum. Moreover according to apple manual
receipt-data
byte
(Required)
The Base64 encoded receipt data.
password
string
(Required)
Your app's shared secret (a hexadecimal string).
Use this field only for receipts that contain auto-renewable subscriptions.
is the receipt a auto-renewable subscription?
If so then you are missing the password in your call.
password
string
(Required)
Your app's shared secret (a hexadecimal string).
Use this field only for receipts that contain auto-renewable subscriptions.