feat(app): update
This commit is contained in:
51
pkg/dto/applepay/IapReceiptData.go
Normal file
51
pkg/dto/applepay/IapReceiptData.go
Normal file
@ -0,0 +1,51 @@
|
||||
package applepay
|
||||
|
||||
// IAP 请求
|
||||
type IapRequest struct {
|
||||
ReceiptData string `json:"receipt-data"` //base64票据
|
||||
Password string `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// iap 支付返回结果
|
||||
type IapResponse struct {
|
||||
Status int `json:"status"` // 支付状态 0=支付成功
|
||||
Environment string `json:"environment"` // 环境
|
||||
Receipt ReceiptDTO `json:"receipt"`
|
||||
}
|
||||
|
||||
// 票据
|
||||
type ReceiptDTO struct {
|
||||
ReceiptType string `json:"receipt_type"`
|
||||
AdamId int `json:"adam_id"`
|
||||
AppItemId int `json:"app_item_id"`
|
||||
BundleId string `json:"bundle_id"`
|
||||
ApplicationVersion string `json:"application_version"`
|
||||
DownloadId int `json:"download_id"`
|
||||
VersionExternalIdentifier int `json:"version_external_identifier"`
|
||||
ReceiptCreationDate string `json:"receipt_creation_date"`
|
||||
ReceiptCreationDateMs string `json:"receipt_creation_date_ms"`
|
||||
ReceiptCreationDatePst string `json:"receipt_creation_date_pst"`
|
||||
RequestDate string `json:"request_date"`
|
||||
RequestDateMs string `json:"request_date_ms"`
|
||||
RequestDatePst string `json:"request_date_pst"`
|
||||
OriginalPurchaseDate string `json:"original_purchase_date"`
|
||||
OriginalPurchaseDateMs string `json:"original_purchase_date_ms"`
|
||||
OriginalPurchaseDatePst string `json:"original_purchase_date_pst"`
|
||||
OriginalApplicationVersion string `json:"original_application_version"`
|
||||
InApp []IapTransaction `json:"in_app"`
|
||||
}
|
||||
|
||||
// 苹果的支付交易对象
|
||||
type IapTransaction struct {
|
||||
Quantity string `json:"quantity"`
|
||||
ProductId string `json:"product_id"`
|
||||
TransactionId string `json:"transaction_id"`
|
||||
OriginalTransactionId string `json:"original_transaction_id"`
|
||||
PurchaseDate string `json:"purchase_date"`
|
||||
PurchaseDateMs string `json:"purchase_date_ms"`
|
||||
PurchaseDatePst string `json:"purchase_date_pst"`
|
||||
OriginalPurchaseDate string `json:"original_purchase_date"`
|
||||
OriginalPurchaseDateMs string `json:"original_purchase_date_ms"`
|
||||
OriginalPurchaseDatePst string `json:"original_purchase_date_pst"`
|
||||
IsTrialPeriod string `json:"is_trial_period"`
|
||||
}
|
||||
Reference in New Issue
Block a user