Git Product home page Git Product logo

Comments (3)

connecteev avatar connecteev commented on August 10, 2024 6

Here's the answer for anyone looking:

  1. To disable cashier's routes:
    Add Cashier::ignoreRoutes(); in the boot method of your AppServiceProvider

  2. To fix the 500 error:
    When trying to override the Stripe Webhook job to perform custom logic as specified in https://github.com/spatie/laravel-stripe-webhooks#performing-custom-logic
    Use

use Spatie\StripeWebhooks\ProcessStripeWebhookJob;

class MyCustomStripeWebhookJob extends ProcessStripeWebhookJob
{
    public function handle()
    {
        // do some custom stuff beforehand

        parent::handle();

        // do some custom stuff afterwards
    }
}

You cannot have a __construct() function (which gets created by default if you run php artisan make:job) in this job, which will throw the 500 exception

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

Exception:

[2020-05-12 17:08:26] local.ERROR: Typed property Spatie\WebhookClient\ProcessWebhookJob::$webhookCall must not be accessed before initialization {"exception":"[object] (Error(code: 0): Typed property Spatie\\WebhookClient\\ProcessWebhookJob::$webhookCall must not be accessed before initialization at 

from laravel-stripe-webhooks.

mmukhin avatar mmukhin commented on August 10, 2024 1
  1. Cashier::ignoreRoutes();

I had to put it in the register method (not boot) to get it to work. Ty though!

from laravel-stripe-webhooks.

freekmurze avatar freekmurze commented on August 10, 2024

How can I disable this default Cashier route,

That's a question you should pose at the cashier repo.

from laravel-stripe-webhooks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.