-
Notifications
You must be signed in to change notification settings - Fork 41
Getting Notice #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Need more info. Can you post your apache error logs? |
Getting exactly the following issues |
you can not use localhost... Also, Never post screenshots like this. I have your hmac and other personal tidbits are displayed for all to see. |
ok thanks for your kind information. I will use heroku . let see if the problem will solved Thanks |
Now I'm using heroku and getting an error Invalid Request! Request or redirect did not come from Shopify Don't know what to do. can you pls tell me what is going wrong here Thanks |
What scopes are you using and what are you trying to do? @reachtokish I can not help with these error messages as they are the generic ones the app_skeleton displays. The best thing to do is to read and understand how each part works down to its basics. The first thing I would do is understand Oauth. many issues can be solved once you have Oauth working and understand how it works. |
Hi thanks for your quick reply. Basically I'm a shopify developer and I want to develop a shopify app by PHP as I don't know Ruby on Rails. So want to develop a Shopify app Thanks |
Again, I can not help you with out having more details of the error. Invalid request could be caused by a number of things. |
Hi, Thanks @myjanky for your quick response I have checked some other issues but can't find a solution. Getting error saying 'Invalid Request! Request or redirect did not come from Shopify' which I have post before This is my developer dashboard screenshot This is my error which I'm getting This is my oauth.php code session_start();
require __DIR__.'/vendor/autoload.php';
use phpish\shopify;
require __DIR__.'/conf.php';
# Guard: http://docs.shopify.com/api/authentication/oauth#verification
shopify\is_valid_request($_GET, SHOPIFY_APP_SHARED_SECRET) or die('Invalid Request! Request or redirect did not come from Shopify');
# Step 2: http://docs.shopify.com/api/authentication/oauth#asking-for-permission
if (!isset($_GET['code']))
{
$permission_url = shopify\authorization_url($_GET['shop'], SHOPIFY_APP_API_KEY, array('read_content', 'write_content', 'read_themes', 'write_themes', 'read_products', 'write_products', 'read_customers', 'write_customers', 'read_orders', 'write_orders', 'read_script_tags', 'write_script_tags', 'read_fulfillments', 'write_fulfillments', 'read_shipping', 'write_shipping'));
die("<script> top.location.href='$permission_url'</script>");
}
# Step 3: http://docs.shopify.com/api/authentication/oauth#confirming-installation
try
{
# shopify\access_token can throw an exception
$oauth_token = shopify\access_token($_GET['shop'], SHOPIFY_APP_API_KEY, SHOPIFY_APP_SHARED_SECRET, $_GET['code']);
$_SESSION['oauth_token'] = $oauth_token;
$_SESSION['shop'] = $_GET['shop'];
echo 'App Successfully Installed!';
}
catch (shopify\ApiException $e)
{
# HTTP status code was >= 400 or response contained the key 'errors'
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
}
catch (shopify\CurlException $e)
{
# cURL error
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
} This is my conf.php code define('SHOPIFY_APP_API_KEY', '65394bcb4a6a92f4f8c5220a8e5b7295');
define('SHOPIFY_APP_SHARED_SECRET', '809b15cd52b228da3f251b581706209b'); This is my install.php code # install.php?shop=example-shop.myshopify.com
require __DIR__.'/vendor/autoload.php';
use phpish\shopify;
require __DIR__.'/conf.php';
# Guard
isset($_GET['shop']) or die ('Query parameter "shop" missing.');
preg_match('/^[a-zA-Z0-9\-]+.myshopify.com$/', $_GET['shop']) or die('Invalid myshopify.com store URL.');
$install_url = shopify\install_url($_GET['shop'], SHOPIFY_APP_API_KEY);
echo "<script> top.location.href='$install_url'</script>"; This is my app url Please help me I'm stuck for this issue Thanks |
settings look ok. |
Thanks @myjanky |
@myjanky are you god or something else like that. App install successfully. I'm just excited. Finding this solution for a month. Really I'm very much thankfull to you for your kind information and helping me Thanks a lot @myjanky One thing can you tell me that now after installation or clicking on my app from dashboard the app is redirecting me to heroku URL . So I want the app to my Shopify dashboard like other apps. Is this possible? Thanks @myjanky |
Yes, has a forceRedirect boolean to get you where you need to be. |
OK let me check Thanks @myjanky |
Yes it works for me Thanks a lot @myjanky :) |
That is great. You're welcome! |
Hi @myjanky Thanks for your previous help Can you pls tell me that how can I run shopify on my local machine? That means I dont need to open shopify dashboard. Basically I told you that I am a shopify liquid template developer and almost every time I have to work with css, HTML, jquery like stuffs and every time I have to open dahboard editor and edit my theme css, HTML. Is there any way that I can do all shopify in my local machine and after doing all the work then I can upload the theme to the shopify dashboard. Is it possible? I know there is a way using theme kit of shopify but not so much sure that this will work or not. This question is not related to this repo but I really want to know this Please help me with this Thanks |
I use beanstalkapp.com for version management. It lets you use GIT to push changes to beanstalkapp and then you can deploy using the apps settings. Now, you would not be able to run shopify locally but at least edit the files offline locally in your own editor (or in beanstalkapp editor). If you use beanstalkapp then any edits in the shopify editor would not be saved in beanstalkapp. (one way pull). |
Thanks a lot @myjanky |
Uh oh!
There was an error while loading. Please reload this page.
Undefined index: signature in C:\xampp\htdocs\php-shop-app\new_prj\vendor\phpish\shopify\shopify.php on line 14
The text was updated successfully, but these errors were encountered: