How to catch the HTTP POST request sent by a Shopify Webhook

前端 未结 5 622
时光取名叫无心
时光取名叫无心 2021-01-31 05:50

I\'m somewhat of a noob, and not afraid to admit that, I\'m working on this project as a learning experience to get better with php and serverside script/ing handling.

I

5条回答
  •  抹茶落季
    2021-01-31 06:31

    Shopify webhook doesn't passed data using the common GET or POST request method. You can use the fopen() method in PHP and pass in the php://input stream.

    Suppose you create a webhook for cart update and set URL http://example.com/cart_update_hook.php then put the following code in cart_update_hook.php to get the data sent by shopify webhook.

    
    

提交回复
热议问题