update webhook payload OP
This commit is contained in:
parent
9124e39283
commit
ba87bb90be
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue