package
2.0.2+incompatible
Repository: https://github.com/ansi2/go-iap.git
Documentation: pkg.go.dev

# Functions

New returns client with credentials.
VerifySignature validate inapp order or subscription data signature.

# Constants

Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledReason https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledSource https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledSource https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for CanceledPurchase.CancelledSource https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Constants for InAppPurchaseData.AccountFlag Account type.
Constants for InAppPurchaseData.AccountFlag Account type.
Other causes.
A user performs subscription upgrade or crossgrade.
A user encounters a problem within the app and cancels the subscription.
Constants for InAppPurchaseData.CancelWay how does the subscription be canceled https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5 Note: You should check SubIsValid first.
Constants for InAppPurchaseData.CancelWay how does the subscription be canceled https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5 Note: You should check SubIsValid first.
Constants for InAppPurchaseData.CancelWay how does the subscription be canceled https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5 Note: You should check SubIsValid first.
Constants for InAppPurchaseData.ConsumptionState https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.ConsumptionState https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.DeferFlag Indicates whether to postpone the settlement date.
Constants for InAppPurchaseData.ExpirationIntent Reasons why a subscription expires.
Constants for InAppPurchaseData.ExpirationIntent Reasons why a subscription expires.
Constants for InAppPurchaseData.ExpirationIntent Reasons why a subscription expires.
Constants for InAppPurchaseData.ExpirationIntent Reasons why a subscription expires.
Constants for InAppPurchaseData.ExpirationIntent Reasons why a subscription expires.
Constants for InAppPurchaseData.ExpirationIntent Reasons why a subscription expires.
Constants for InAppPurchaseData.IntroductoryFlag Indicates whether a subscription is in the renewal period with promotion or not.
Constants for InAppPurchaseData.IntroductoryFlag Indicates whether a subscription is in the renewal period with promotion or not.
Constants for InAppPurchaseData.Kind product type https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.Kind product type https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.Kind product type https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.NotifyClosed Indicates whether a user has disabled the subscription notification function.
Constants for InAppPurchaseData.NotifyClosed Indicates whether a user has disabled the subscription notification function.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
M-Pesa.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
Constants for InAppPurchaseData.PayType payment methods when buying the product.
The user has agreed with the price increase.
The user did not give any comfirmation.
Constants for InAppPurchaseData.PurchaseState https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.PurchaseState https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.PurchaseState https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.PurchaseState https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/server-data-model-0000001050986133-V5.
Constants for InAppPurchaseData.PurchaseType indicates if the product is purchased through sandbox environment or promotion.
Constants for InAppPurchaseData.PurchaseType indicates if the product is purchased through sandbox environment or promotion.
A user proactively canceled the subscription auto-renewal.
The subscription will be auto-renewed.
Constants for InAppPurchaseData.RetryFlag Indicates whether the system still tries to renew an expired subscription.
Constants for InAppPurchaseData.RetryFlag Indicates whether the system still tries to renew an expired subscription.
Constants for InAppPurchaseData.TrialFlag Indicates whether a subscription is in the free trial period or not.
Constants for InAppPurchaseData.TrialFlag Indicates whether a subscription is in the free trial period or not.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
Constants for StatusUpdateNotification.NotificationType https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.

# Variables

ErrorResponseAbnormalUserAccount The user account is abnormal, for example, the user has been deregistered.
ErrorResponseConsumedProduct The product cannot be consumed or confirmed because it has been consumed or confirmed.
ErrorResponseCritical A critical error occurs during API operations.
ErrorResponseInvalidParameter The parameter passed to the API is invalid.
ErrorResponseProductNotBelongToUser A user failed to consume or confirm a product because the user does not own the product.
ErrorResponseUnknown error placeholder for undocumented errors.

# Structs

ApplicationAccessToken model, received from HMS OAuth API https://developer.huawei.com/consumer/en/doc/HMSCore-Guides-V5/open-platform-oauth-0000001050123437-V5#EN-US_TOPIC_0000001050123437__section12493191334711.
CanceledPurchase individual canceled purchase information, for CanceledPurchaseList.
CanceledPurchaseList response from query canceled or refunded purchase list Document: https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-cancel-or-refund-record-0000001050746117-V5.
Client implements VerifySignature, VerifyOrder and VerifySubscription methods.
InAppPurchaseData json model.
ModifySubscriptionResponse JSON response from {rootUrl}/sub/applications/v2/purchases/stop|delay|returnFee|withdrawal.
OrderVerifyResponse JSON response from {rootUrl}/applications/purchases/tokens/verify.
StatusUpdateNotification JSON content when unmarshal NotificationRequest.StatusUpdateNotification https://developer.huawei.com/consumer/en/doc/HMSCore-References-V5/api-notifications-about-subscription-events-0000001050706084-V5#EN-US_TOPIC_0000001050706084__section18290165220716.
SubscriptionNotification Request parameters when a developer server is called by HMS API.
SubscriptionVerifyResponse JSON response after requested {rootUrl}/sub/applications/v2/purchases/get.