verbb / snipcart

A Craft CMS plugin to integrate with Snipcart.
Other
21 stars 9 forks source link

Process new snipcart webhooks #23

Closed tobystokes closed 4 years ago

tobystokes commented 4 years ago

Describe the bug

Since https://docs.snipcart.com/v3/release-notes#aug-19-2020

A webhook is now sent when issuing order refunds. A webhook is now sent when a notification is added to an order.

To Reproduce

{
  "eventName": "order.notification.created",
  "mode": "Live",
  "createdOn": "2020-09-17T21:09:29.0873579Z",
  "content": {
    "orderToken": "XXX",
    "notificationType": "OrderStatusChanged",
    "sentByEmail": false,
    "sentByEmailOn": null,
    "subject": null,
    "body": null,
    "message": "Order status changed from 'Processed' to 'Shipped'."
  }
}

Expected behavior

200 response instead of 400

Software

Additional context

Not a breaking issue, and I have no need to process these webhooks, but Snipcart is sending regular 'A webhook has failed' emails.

mattstein commented 4 years ago

Thanks for the issue, @tobystokes! I’ll get both of those added.

mattstein commented 4 years ago

Just added support for these in https://github.com/workingconcept/snipcart-craft-plugin/releases/tag/1.4.4.