Skip to content

loicm/shopify-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Receive a Webhook from Shopify

Shopify has Webhooks features which have to be verified by calculating a digital signature.

Here is a small class to receive the POST request, verify the signature integrity and getting the data.

I use this is a tiny project to try phpspec.

Install

composer require loicm/shopify-webhook

Use

use Loicm\Shopify\WebHook;

$shopify_secret = 'Here is your secret key';

$webhook = new WebHook($shopify_secret);

if ($webhook->verify()) {
    // Do your stuff
    $data = $webhook->getData();
}

About

Check Shopify Webhooks by verifying their digital signature

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages