Versions in this module Expand all Collapse all v0 v0.1.0 Mar 10, 2022 Changes in this version + const IAPResponseResultBILLING_UNAVAILABLE + const IAPResponseResultDEVELOPER_ERROR + const IAPResponseResultERROR + const IAPResponseResultITEM_ALREADY_OWNED + const IAPResponseResultITEM_CONSUMED + const IAPResponseResultITEM_NOT_OWNED + const IAPResponseResultITEM_UNAVAILABLE + const IAPResponseResultOK + const IAPResponseResultSERVICE_UNAVAILABLE + const IAPResponseResultUSER_CANCELED + const OrderSiteAppTouch + const OrderSiteChina + const OrderSiteGermany + const OrderSiteRussia + const OrderSiteSingapore + const ProductTokenURL + const SubscriptionSiteAppTouchURL + const SubscriptionSiteChina + const SubscriptionSiteGermany + const SubscriptionSiteRussia + const SubscriptionSiteSingapore + func VerifySignature(jsonContent string, signature string, publicKey string) error + type Client struct + OrderSiteURL string + SubscriptionSiteURL string + TokenURL string + func New() *Client + func NewWithClient(hc *http.Client) *Client + func (c *Client) GetHeaderToken(reqBody IAPRequest) (string, error) + func (c *Client) VerifySubscription(ctx context.Context, reqBody IAPRequest) (*InappPurchaseData, error) + func (c *Client) VerifyToken(ctx context.Context, reqBody IAPRequest) (*InappPurchaseData, error) + type IAPOrderResponse struct + DataSignature string + PurchaseTokenData string + ResponseCode string + ResponseMessage string + type IAPRequest struct + ApplicationPublicKey string + ClientID string + ClientSecret string + ProductID string + PurchaseToken string + SubscriptionID string + type IAPSubscriptionResponse struct + InappPurchaseData string + ResponseCode string + ResponseMessage string + type InappPurchaseData struct + AccountFlag *int + AppInfo string + ApplicationID int + AutoRenewing bool + CancelReason *int + CancelTime *int64 + CancelWay *int + CancellationTime *int64 + CancelledSubKeepDays int + Confirmed *int + ConsumptionState *int + Country string + Currency string + DaysLasted int + DeferFlag int + DeveloperChallenge string + DeveloperPayload string + ExpirationDate *int64 + ExpirationIntent int + IntroductoryFlag *int + Kind int + LastOrderID string + NotifyClosed *int + NumOfDiscount int + NumOfPeriods *int + OrderID string + OriginalPurchaseTime *int64 + OriginalSubscriptionID string + PackageName string + PayOrderID string + PayType string + Price int + PriceConsentStatus *int + ProductGroup string + ProductID string + ProductName string + PurchaseState int + PurchaseTime *int64 + PurchaseToken string + PurchaseType *int + Quantity int + RenewPrice int + RenewStatus *int + ResumeTime *int64 + RetryFlag *int + SdkChannel string + SubscriptionID string + SubscriptionIsvalid bool + SurveyDetails string + SurveyReason *int + TrialFlag *int + type TokenResponse struct + AccessToken string