feat(apple): 添加通过transaction_id附加苹果交易功能
Build docker and publish / build (20.15.1) (push) Successful in 6m41s
Build docker and publish / build (20.15.1) (push) Successful in 6m41s
新增通过transaction_id附加苹果交易的功能,包括: 1. 添加AttachAppleTransactionByIdRequest类型和对应路由 2. 实现AppleIAPConfig配置模型 3. 添加ServerAPI获取交易信息的实现 4. 优化JWS解析逻辑,增加cleanB64函数处理空格 5. 完善苹果通知处理逻辑的日志和注释
This commit is contained in:
@@ -127,3 +127,26 @@ func (l *CryptoSaaSConfig) Unmarshal(data []byte) error {
|
||||
aux := (*Alias)(l)
|
||||
return json.Unmarshal(data, &aux)
|
||||
}
|
||||
|
||||
type AppleIAPConfig struct {
|
||||
ProductIds []string `json:"product_ids"`
|
||||
KeyID string `json:"key_id"`
|
||||
IssuerID string `json:"issuer_id"`
|
||||
PrivateKey string `json:"private_key"`
|
||||
Sandbox bool `json:"sandbox"`
|
||||
}
|
||||
|
||||
func (l *AppleIAPConfig) Marshal() ([]byte, error) {
|
||||
type Alias AppleIAPConfig
|
||||
return json.Marshal(&struct {
|
||||
*Alias
|
||||
}{
|
||||
Alias: (*Alias)(l),
|
||||
})
|
||||
}
|
||||
|
||||
func (l *AppleIAPConfig) Unmarshal(data []byte) error {
|
||||
type Alias AppleIAPConfig
|
||||
aux := (*Alias)(l)
|
||||
return json.Unmarshal(data, &aux)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user