App approval issues - App must install succesfully

Highlighted
Explorer
107 8 15

Please uninstall your app from that store and then go to partners.shopify.com, clicks Apps, then click on your app name, then click Test your app (select your development store) and then "Install." What happens when you do that? 

You also may get rejected for not implementing the Billing API. I suggest using the GraphQL instead of REST API version. 

0 Likes
Highlighted
New Member
5 0 0

Hi!

It is working fine when I text my app from partner account. 

 

I think it may issue as below line.

 

Could you  please check.

$shop="omernew"

$install_url = "https://" . $shop . ".myshopify.com/admin/oauth/authorize?client_id=" . $api_key . "&scope=" . $scopes . "&redirect_uri=" . urlencode($redirect_uri);

0 Likes
Highlighted
New Member
5 0 0

Hello !

I hope you have see my video in last message for workflow of app

I need to add popup for ask to store name on click install app. ?

 

Please check attached screen sort and guide me.image_2020_07_13T11_10_22_228Z.png

 

 

Please help ASAP

0 Likes
Highlighted
Explorer
107 8 15

This is not how you do it. You need to pick up shopOrigin dynamically (Shopify's guidance here is super thin, unless you're using one of their libraries).

This is how it has to work:

  • Let's say your app is hosted at glorifyapp.com/productshopify and this is where you point your Shopify app URL 
  • When a merchant comes to install your app from the public app store OR from the "install on your development store" link, Shopify will append shop, hmac and timestamp url parameters. So when someone clicks "install" they are routed to glorifyapp.com/productshopify?shop={shop}&hmac={hmac}&timestamp={timestamp}
  • In my case I'm using Javascript so I just do URLParams to get the shopOrigin to generate the dynamic permissionUrl 
  • In general, you need to write your own logic to determine if a user has already installed your app and has a valid accessToken and charge_id. If so, you can welcome them back to your app; if not, then you generate the permissionUrl so they can install your app. 

So as I stated, you need to follow the instructions in my previous message where you actually click "install" from the "test on your development store" and see what happens - this is the same way Shopify is testing your OAuth flow. 

0 Likes