Documentation ¶
Index ¶
- Constants
- func AppleTime(t any) (time.Time, error)
- func GetAppleLatestReceiptInfo(rsp *apple.VerifyResponse) (*apple.LatestReceiptInfo, error)
- func IsPrd() bool
- func NotificationTypeSubtypeExpire(notificationType, subtype string) bool
- func NotificationTypeSubtypeJoinVIP(notificationType, subtype string) bool
- type AppleNotifications
- type AppleNotificationsHandler
- type ApplePay
- type Exception
Constants ¶
View Source
const ( ENVByAppEnv = "APP_ENV" ENVPRD = "prd" )
Variables ¶
This section is empty.
Functions ¶
func GetAppleLatestReceiptInfo ¶
func GetAppleLatestReceiptInfo(rsp *apple.VerifyResponse) (*apple.LatestReceiptInfo, error)
GetAppleLatestReceiptInfo 获取第一个数据
func NotificationTypeSubtypeExpire ¶
NotificationTypeSubtypeExpire 取消用户会员
func NotificationTypeSubtypeJoinVIP ¶
NotificationTypeSubtypeJoinVIP 根据状态继续是会员
Types ¶
type AppleNotifications ¶
type AppleNotifications struct { SignedPayload string `json:"signed_payload"` Payload *apple.NotificationV2Payload `json:"payload"` RenewalInfo *apple.RenewalInfo `json:"renewal_info"` TransactionInfo *apple.TransactionInfo `json:"transaction_info"` }
type AppleNotificationsHandler ¶
type AppleNotificationsHandler func(notifications *AppleNotifications) error
type ApplePay ¶
type ApplePay struct {
Pwd string
}
func NewApplePay ¶
func (*ApplePay) HandlerNotifications ¶
func (a *ApplePay) HandlerNotifications(signedPayload string, handlers ...AppleNotificationsHandler) error
HandlerNotifications 支付回调用
func (*ApplePay) ParseNotifications ¶
func (a *ApplePay) ParseNotifications(signedPayload string) (*AppleNotifications, error)
ParseNotifications 苹果支付回调解析
func (*ApplePay) VerifyReceipt ¶
func (a *ApplePay) VerifyReceipt(receipt string) (*apple.VerifyResponse, error)
Click to show internal directories.
Click to hide internal directories.