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