Skip to content
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

Getting Laravel's 404 page after recurring plan payment accepted. #367

Open
ignacio-dev opened this issue Nov 18, 2024 · 3 comments
Open
Labels
bug Something isn't working unconfirmed Bug has not been reproduced yet

Comments

@ignacio-dev
Copy link

Expected Behavior

Should process payment via BillingController@process and get redirected user back to home.

Current Behavior

I get redirected to Shopify's payment approval.
I accept payment.
I get Laravel's 404 error page. My User is still hasshopify_freemium set to true, and no plan_id is assigned.
I do however get an email from Shopify saying that I've approved a recorruing charge.

Steps to reproduce

I set prefix to 'shopify-app'
I enable billing and enable freemium.
I redirect user here:

$subscribeUrl = route(
    Util::getShopifyConfig('route_names.billing'),
    array_merge($request->input(), [
        'shop' => $shop->getDomain()->toNative(),
        'host' => $request->get('host'),
        'plan' => Plan::where('name', 'default')->value('id'),
    ])
);

It shows the right price. I accept it.
I get Laravel's 404.

Context

  • Package Version: v21.1
  • Laravel Version: v11.0
  • PHP Version: v8.2
  • Template Engine: React, but with real redirects (no spa active)
  • Using a toolset (Docker, Laradock, Vagrant, etc.): Docker, Sail, Ngrok

Failure Logs

Laravel debug bar shows:

The route billing/process/2 could not be found.
vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php#44
@ignacio-dev ignacio-dev added bug Something isn't working unconfirmed Bug has not been reproduced yet labels Nov 18, 2024
@ignacio-dev
Copy link
Author

For some reason, when it redirects, it's not using the prefix 🤔

When I call route(Util::getShopifyConfig('route_names.billing.process')) I get /shopify-app/billing/process, but when I actually do the payment, Shopify redirects me to billing/process

@ignacio-dev
Copy link
Author

Ok, I can confirm that the SHOPIFY_BILLING_REDIRECT does not respect the SHOPIFY_APP_PREFIX.

Is this expected? Or is it a bug?

@Kyon147
Copy link
Owner

Kyon147 commented Nov 19, 2024

@ignacio-dev it is likely just been missed of tbh - I don't think many people use the prefix so it is likely just a small oversight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants