Exemplo n.º 1
0
 public function test_validateWebhook()
 {
     $shopify = new \cdyweb\Shopify\Shopify(json_decode(json_encode(array('shopname' => 'unit-test', 'scope' => array('read', 'write'), 'client_id' => 'foo', 'client_secret' => 'bar', 'redirect_uri' => 'http://baz'))));
     $params = array('HTTP_X_SHOPIFY_HMAC_SHA256' => '482eb81de7565456e88e7fe734b0b17a40cc5d457d291c6e878eddb2f324d7ce');
     $str = 'Lorem Ipsum';
     $result = $shopify->validateWebhook($str, $params);
     $this->assertEquals(true, $result);
 }