Open vramiguez opened 8 years ago
I think you need to replace $verify = $shopify->verifyRequest($request->input());
with $verify = $shopify->verifyRequest($request->all());
@joshrps I have tried the way of you, but it is not working. Please help me. Thank you!
Hi Joshrps,
I got the same issue ie. undefined index code while verifying the request using the function verifyRequest() in api.php file.
I think there is an error on the function called verifyRequest().
elseif (is_array($data))
{
$da = $data;
}
The array variable $da
having only three array veriables. they are hmac
,shop
and timestamp
.
On line number 64 on api.php file
$queryString = http_build_query(array('code' => $da['code'], 'shop' => $da['shop'], 'timestamp' => $da['timestamp']));
you are setting an addition non array veriable $da['code']
and this returning the above shown error undefined index code
. Hope you understand the issue.
I need some help with the API calls on my first embedded application developed in Laravel. So far, I've been able to install my app and to see some basic (html) code in the backend of my shop.
However, I would like to display some products in my embedded application, and I'm having a hard time to connect with the API:
In the controller of my callback page, I'm have the following:
However, I have tracked the issue to the callback view ('shopify.callbackView'), in the ShopifyApp.init method to be more specific:
Apparently it doesn't recognize the code value on the URL (but I see it in the URL) and throws an error: ErrorException in api.php line 64: Undefined index: code
If I remove the javascript code that has the ShopifyApp on it, I get the body displayed, but not embedded in the backend of Shopify.
Not sure where the problem is and if that code is using the best practices. I would appreciate any help/guidance you can provide.
Thanks