integrate-onpoint #5

Merged
sinhluu merged 15 commits from integrate-onpoint into master 2022-10-31 09:36:25 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit ba87bb90be - Show all commits

View File

@ -74,7 +74,7 @@ type WebhookDataUpdateOrderStatus struct {
type WebhookPayload struct { type WebhookPayload struct {
Event string `json:"event"` Event string `json:"event"`
RequestedAt time.Time `json:"requested_at"` RequestedAt time.Time `json:"requested_at"`
Data interface{} `json:"data"` Payload interface{} `json:"payload"`
} }
// GetDataEventUpdateOrderStatus ... // GetDataEventUpdateOrderStatus ...
@ -82,7 +82,7 @@ func (p WebhookPayload) GetDataEventUpdateOrderStatus() (data *WebhookDataUpdate
if p.Event != webhookEventUpdateOrderStatus { if p.Event != webhookEventUpdateOrderStatus {
return nil, false return nil, false
} }
b, err := pjson.Marshal(p.Data) b, err := pjson.Marshal(p.Payload)
if err != nil { if err != nil {
return nil, false return nil, false
} }
@ -97,7 +97,7 @@ func (p WebhookPayload) GetDataEventUpdateInventory() (data *WebhookDataUpdateIn
if p.Event != webhookEventUpdateInventory { if p.Event != webhookEventUpdateInventory {
return nil, false return nil, false
} }
b, err := pjson.Marshal(p.Data) b, err := pjson.Marshal(p.Payload)
if err != nil { if err != nil {
return nil, false return nil, false
} }