feat: refactor webhook handling for ViettelFFM partner API

- Add structs `Webhook`, `WebhookData` to handle webhook data in ViettelFFM partner API

Signed-off-by: Sinh <luuvansinh555@gmail.com>
This commit is contained in:
Sinh 2024-06-26 16:53:44 +07:00
parent 624cb96239
commit b7195b364f
1 changed files with 13 additions and 0 deletions

View File

@ -64,3 +64,16 @@ type ORResult struct {
OrId int `json:"or_id"`
Status string `json:"status"`
}
type Webhook struct {
Data WebhookData `json:"data"`
}
type WebhookData struct {
OrId int `json:"or_id"`
OrCode string `json:"or_code"`
PartnerOrCode string `json:"partner_or_code"`
Status string `json:"status"`
TotalPrice float64 `json:"total_price"`
ShippingFee int `json:"shipping_fee"`
}