From a542ded549b9adb48d859032129c65358f958e3b Mon Sep 17 00:00:00 2001 From: Daniel Zahariev <daniel.zahariev@gmail.com> Date: Wed, 18 Dec 2019 10:17:26 +0200 Subject: [PATCH] Allow verification of custom request params --- lib/AuthHelper.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/AuthHelper.php b/lib/AuthHelper.php index e879964..70d8961 100644 --- a/lib/AuthHelper.php +++ b/lib/AuthHelper.php @@ -54,11 +54,14 @@ public static function buildQueryString($data) * * @throws SdkException if SharedSecret is not provided or hmac is not found in the url parameters * + * @param bool|array $data The query params array * @return bool */ - public static function verifyShopifyRequest() + public static function verifyShopifyRequest($data = false) { - $data = $_GET; + if ($data === false) { + $data = $_GET; + } if(!isset(ShopifySDK::$config['SharedSecret'])) { throw new SdkException("Please provide SharedSecret while configuring the SDK client.");