Osiset\ShopifyApp\Exceptions\ApiException - Unknown Error on Billing Redirect in Laravel Middleware #385
Unanswered
Discipline-7002
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am encountering the following error while redirecting to the billing route in my Laravel app:
Osiset\ShopifyApp\Exceptions\ApiException: Unknown Error
Error Context:
When redirecting to the billing URL:
/billing?shop=product-redirection.myshopify.com&host=YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvcHJvZHVjdC1vcHRpb25zLXJlZGlyZWN0aW9u
The app throws the above error.
Code in Middleware:
user(); if (! $shop->plan && ! $shop->isFreemium() && ! $shop->isGrandfathered()) { $redirectUrl = route( Util::getShopifyConfig('route_names.billing'), [ 'shop' => $shop->getDomain()->toNative(), 'host' => $request->get('host'), ] ); return Inertia::render('BillableRedirect', [ 'url' => $redirectUrl ])->toResponse($request); } return $next($request); } } Give solution for this error, In local system working fine. getting error on production serverBeta Was this translation helpful? Give feedback.
All reactions