Trying to get Laravel Cashier to work when adding a payment. Following everything as instructed in documentation (https://laravel.com/docs/6.x/billing#storing-payment-methods). Creating a customer works well but exception is being thrown when trying to establish intent. Any thoughts as to what I'm missing?
I'm using the latest homestead, laravel and cashier packages.!
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to undefined method stdClass::createSetupIntent()
Dear @jozeperez have a look at your code specially at this point
$customer = DB::table('customers')->find($id);
Try to change into
$customer = Customer::find($id)
Regards
Thanks Eshan Alizad! That is exaclty what was wrong. I wasn't using the eloquent model for the customer record. Thanks for taking the time to point me in the right direction.
:)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community