App reviews, troubleshooting, and recommendations
hello Everyone,
I am using shopify/shopify-api package in my embedded app created in laravel. here is my code of context initialization
Context::initialize(
env('SHOPIFY_API_KEY'),
env('SHOPIFY_API_SECRET_NEW'),
$scope,
env('APP_URL'),
new ShopifySessionStorage(),
env('SHOPIFY_API_VERSION'),
true);
then i call the OAuth begin function from my landing-page route which is "/". here is the code :
$redirect_uri = '/auth-callback';
$isOnline = false;
$redirectURl = OAuth::begin(
$shop,
$redirect_uri,
$isOnline,
['App\Lib\CookieHandler', 'saveShopifyCookie']
);
here is the code of saveShopifyCookie function:
public static function saveShopifyCookie(OAuthCookie $cookie)
{
setcookie($cookie->getName(),$cookie->getValue(),60,'/');
return true;
}
in auth-callback url route i called OAuth::callback function and pass cookie as first argument and request query as second argument
$session = OAuth::callback(
$cookie_value,
$request->query(),
);
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023