laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.37k stars 671 forks source link

The payment attempt failed because of an invalid payment method. #899

Closed sonichandni closed 4 years ago

sonichandni commented 4 years ago

Description:

While crating new subscripn I am getting this: "message": "The payment attempt failed because of an invalid payment method.", "exception": "Laravel\\Cashier\\Exceptions\\PaymentFailure", "file": "/home/chandni/Chandni/Bacancy/dita/vendor/laravel/cashier/src/Exceptions/PaymentFailure.php",

Steps To Reproduce:

$user->createOrGetStripeCustomer(); $user->updateDefaultPaymentMethod($request->paymentIntent['paymentMethod']['id']);

$user->newSubscription('main', $plan->stripe_plan) ->create($request->paymentIntent['paymentMethod']['id'], [ 'name' => $billing_details['name'], 'description' => 'test description', 'email' => $billing_details['email'], "address" => $billing_details['address'] ]);`

driesvints commented 4 years ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.