awa / go-iap

go-iap verifies the purchase receipt via AppStore, GooglePlayStore, AmazonAppStore and Huawei HMS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

json: cannot unmarshal object into Go struct field IAPResponse.latest_receipt_info of type []appstore.InApp

kf99916 opened this issue · comments

IAPResponse.latest_receipt_info from VerifyReceipt API may be a appstore.InApp instead of a []appstore.InApp

Got the same error and I think it is similar to #70 So there is a IAPResponseForIOS6 which should handle that. The problem is that Apple's verification server suddenly started responding with there iOS6-style responses.

Is there a way to control this?

The Verify method takes interface{} as response type, so I guess it is possible to try iOS7 style receipt and than re-try with iOS 6 one.