Versions in this module Expand all Collapse all v1 v1.0.0 Aug 23, 2023 Changes in this version + const NotificationTypeV2ConsumptionRequest + const NotificationTypeV2DidChangeRenewalPref + const NotificationTypeV2DidChangeRenewalStatus + const NotificationTypeV2DidFailToRenew + const NotificationTypeV2DidRenew + const NotificationTypeV2Expired + const NotificationTypeV2GracePeriodExpired + const NotificationTypeV2OfferRedeemed + const NotificationTypeV2PriceIncrease + const NotificationTypeV2Refund + const NotificationTypeV2RefundDeclined + const NotificationTypeV2RenewalExtended + const NotificationTypeV2Revoke + const NotificationTypeV2Subscribed + const SubTypeV2Accepted + const SubTypeV2AutoRenewDisabled + const SubTypeV2AutoRenewEnabled + const SubTypeV2BillingRecovery + const SubTypeV2BillingRetry + const SubTypeV2Downgrade + const SubTypeV2GracePeriod + const SubTypeV2InitialBuy + const SubTypeV2Pending + const SubTypeV2PriceIncrease + const SubTypeV2Resubscribe + const SubTypeV2Upgrade + const SubTypeV2Voluntary + const UrlProd + const UrlSandbox + func ExtractClaims(signedPayload string, tran jwt.Claims) (err error) + func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) + type AllSubscriptionStatusesRsp struct + AppAppleId int + BundleId string + Data []*SubscriptionGroupIdentifierItem + Environment string + type Client struct + func NewClient(iss, bid, kid, privateKey string, isProd bool) (client *Client, err error) + func (c *Client) GetAllSubscriptionStatuses(ctx context.Context, transactionId string) (rsp *AllSubscriptionStatusesRsp, err error) + func (c *Client) GetNotificationHistory(ctx context.Context, paginationToken string, bm gopay.BodyMap) (rsp *NotificationHistoryRsp, err error) + func (c *Client) GetRefundHistory(ctx context.Context, transactionId, revision string) (rsp *RefundHistoryRsp, err error) + func (c *Client) GetTransactionHistory(ctx context.Context, transactionId string, bm gopay.BodyMap) (rsp *TransactionHistoryRsp, err error) + func (c *Client) GetTransactionInfo(ctx context.Context, transactionId string) (rsp *TransactionInfoRsp, err error) + func (c *Client) LookUpOrderId(ctx context.Context, orderId string) (rsp *LookUpOrderIdRsp, err error) + func (c *Client) SendConsumptionInformation(ctx context.Context, transactionId string, bm gopay.BodyMap) (err error) + type CustomClaims struct + Aud string + Bid string + Exp int64 + Iat int64 + Iss string + type Data struct + AppAppleID int + BundleID string + BundleVersion string + Environment string + SignedRenewalInfo string + SignedTransactionInfo string + type InApp struct + CancellationDate string + CancellationDatePST string + CancellationDateTimestamp string + CancellationReason string + ExpiresDate string + ExpiresDatePST string + ExpiresDateTimestamp string + IsInIntroOfferPeriod string + IsTrialPeriod string + OriginalPurchaseDate string + OriginalPurchaseDatePST string + OriginalPurchaseDateTimestamp string + OriginalTransactionId string + ProductId string + PromotionalOfferId string + PurchaseDate string + PurchaseDatePST string + PurchaseDateTimestamp string + Quantity string + TransactionId string + WebOrderLineItemId string + type LastTransactionsItem struct + OriginalTransactionId string + SignedRenewalInfo string + SignedTransactionInfo string + Status int + func (d *LastTransactionsItem) DecodeRenewalInfo() (ri *RenewalInfo, err error) + func (d *LastTransactionsItem) DecodeTransactionInfo() (ti *TransactionInfo, err error) + type LatestReceiptInfo struct + AppAccountToken string + CancellationDate string + CancellationDatePST string + CancellationDateTimestamp string + CancellationReason string + ExpiresDate string + ExpiresDatePST string + ExpiresDateTimestamp string + InAppOwnershipType string + IsInIntroOfferPeriod string + IsTrialPeriod string + IsUpgraded string + OfferCodeRefName string + OriginalPurchaseDate string + OriginalPurchaseDatePST string + OriginalPurchaseDateTimestamp string + OriginalTransactionId string + ProductId string + PromotionalOfferId string + PurchaseDate string + PurchaseDatePST string + PurchaseDateTimestamp string + Quantity string + SubscriptionGroupIdentifier string + TransactionId string + WebOrderLineItemId string + type LookUpOrderIdRsp struct + SignedTransactions []SignedTransaction + Status int + type NotificationHistoryRsp struct + HasMore bool + NotificationHistory []*NotificationItem + PaginationToken string + type NotificationItem struct + SendAttempts []*SendAttemptItem + SignedPayload string + type NotificationV2Payload struct + Data *Data + NotificationType string + NotificationUUID string + NotificationVersion string + Subtype string + func DecodeSignedPayload(signedPayload string) (payload *NotificationV2Payload, err error) + func (d *NotificationV2Payload) DecodeRenewalInfo() (ri *RenewalInfo, err error) + func (d *NotificationV2Payload) DecodeTransactionInfo() (ti *TransactionInfo, err error) + type NotificationV2Req struct + SignedPayload string + type PendingRenewalInfo struct + AutoRenewProductId string + AutoRenewStatus string + ExpirationIntent string + GracePeriodExpiresDate string + GracePeriodExpiresDatePST string + GracePeriodExpiresDateTimestamp string + IsInBillingRetryPeriod string + OfferCodeRefName string + OriginalTransactionId string + PriceConsentStatus string + ProductId string + Promotionalofferid string + type Receipt struct + AdamId int64 + AppItemId int64 + ApplicationVersion string + BundleId string + DownloadId int64 + ExpirationDate string + ExpirationDatePST string + ExpirationDateTimestamp string + InApp []*InApp + OriginalApplicationVersion string + OriginalPurchaseDate string + OriginalPurchaseDatePST string + OriginalPurchaseDateTimestamp string + PreorderDate string + PreorderDatePST string + PreorderDateTimestamp string + ReceiptCreationDate string + ReceiptCreationDatePST string + ReceiptCreationDateTimestamp string + ReceiptType string + RequestDate string + RequestDatePST string + RequestDateTimestamp string + VersionExternalIdentifier int64 + type RefundHistoryRsp struct + HasMore bool + Revision string + SignedTransactions []SignedTransaction + type RenewalInfo struct + AutoRenewProductId string + AutoRenewStatus int64 + Environment string + ExpirationIntent int64 + GracePeriodExpiresDate int64 + IsInBillingRetryPeriod bool + OfferIdentifier string + OfferType int64 + OriginalTransactionId string + PriceIncreaseStatus int64 + ProductId string + RecentSubscriptionStartDate int64 + SignedDate int64 + type SendAttemptItem struct + AttemptDate int64 + SendAttemptResult string + type SignedTransaction string + func (s *SignedTransaction) DecodeSignedTransaction() (ti *TransactionsItem, err error) + type StatusCodeErr struct + ErrorCode int + ErrorMessage string + func IsStatusCodeError(err error) (*StatusCodeErr, bool) + func (e *StatusCodeErr) Error() string + type SubscriptionGroupIdentifierItem struct + LastTransactions []*LastTransactionsItem + SubscriptionGroupIdentifier string + type TransactionHistoryRsp struct + AppAppleId int + BundleId string + Environment string + HasMore bool + Revision string + SignedTransactions []SignedTransaction + type TransactionInfo struct + AppAccountToken string + BundleId string + Environment string + ExpiresDate int64 + InAppOwnershipType string + IsUpgraded bool + OfferIdentifier string + OfferType int64 + OriginalPurchaseDate int64 + OriginalTransactionId string + ProductId string + PurchaseDate int64 + Quantity int64 + RevocationDate int64 + RevocationReason int + SignedDate int64 + Storefront string + StorefrontId string + SubscriptionGroupIdentifier string + TransactionId string + TransactionReason string + Type string + WebOrderLineItemId string + type TransactionInfoRsp struct + SignedTransactionInfo string + func (t *TransactionInfoRsp) DecodeSignedTransaction() (ti *TransactionsItem, err error) + type TransactionsItem struct + BundleId string + Environment string + ExpiresDate int64 + InAppOwnershipType string + OfferType int + OriginalPurchaseDate int64 + OriginalTransactionId string + ProductId string + PurchaseDate int64 + Quantity int + SignedDate int64 + SubscriptionGroupIdentifier string + TransactionId string + Type string + WebOrderLineItemId string + type VerifyRequest struct + ExcludeOldTranscations bool + Password string + Receipt string + type VerifyResponse struct + Environment string + IsRetryable bool + LatestReceipt string + LatestReceiptInfo []*LatestReceiptInfo + PendingRenewalInfo []*PendingRenewalInfo + Receipt *Receipt + Status int + func VerifyReceipt(ctx context.Context, url, pwd, receipt string) (rsp *VerifyResponse, err error)