php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

Allow verification of custom request params

Open daniel-zahariev opened this issue 5 years ago • 4 comments

daniel-zahariev avatar Dec 18 '19 08:12 daniel-zahariev

@daniel-zahariev Why do you want to do that? The required params here should be coming from Shopify through URL params anyhow.

tareqtms avatar Dec 18 '19 08:12 tareqtms

@tareqtms because i'm building an API for Shopify embedded app and i want to use the Referrer HTTP header and verify that it has valid URL params (they should be sent from Shopify). And in order to do that i want to pass the extracted params to the verification method.

daniel-zahariev avatar Dec 18 '19 10:12 daniel-zahariev

@daniel-zahariev Everything sent from Shopify are already available under $_GET variable. What extra you want to add there? However, if you want you can add your extra parameters to the $_GET variable itself.

tareqtms avatar Dec 18 '19 10:12 tareqtms

The API i'm building is called via JavaScript fetch method and so i want to use the HTTP Referrer header to do the authorisation. Don't think it's the best way to play with $_GET variable.

daniel-zahariev avatar Dec 18 '19 11:12 daniel-zahariev