Category : stripe-payments

trying to use the existing stripe_id on the user model to make a paymentIntent try { if (Auth::user()->stripe_id) { $customer = StripeCustomer::retrieve(Auth::user()->stripe_id)->id; } else { $customer = StripeCustomer::create()->id; } return PaymentIntent::create([ ‘amount’ => $request->total, ‘currency’ => ‘gbp’, ‘setup_future_usage’ => ‘off_session’, ‘customer’ => $customer, ]); } catch (Exception $e) { return (object)[‘isError’ => ‘true’,’message’=> $e->getMessage()]; } ..

Read more

I am setting up a webhook to receive events from stripe. When I configured stripe to listen to my local deployment of the website, everything worked fine. The webhook successfully handled all the sent events. However, in the production environment, after setting up the webhook url in stripe, the url returns a 401 Unauthorized error. ..

Read more

I am setting up a webhook in a Laravel project to receive events from stripe. When I configured stripe to send the webhook events to my local deployment of the website, everything worked fine. The webhook successfully handled all the sent events. However, in the production environment, after setting up the webhook url in stripe, ..

Read more

Need help with setting up a monthly subscription with stripe. First I pass $intent variable to the view where the form is located: public function checkoutForm() { $user = auth()->user(); $intent = $user->createSetupIntent(); return view(‘app.payments.form’, compact(‘intent’)); } My HTML form: <form action="{{route(‘app.payments.checkout’)}}" method="POST" id="payment-form"> @csrf <div class="form-row"> <div> <label class="form-label">Email</label> <input id="email" name="email" class="form-control"> </div> ..

Read more

I’m attempting to use Laravel Cashier to retrieve line items of the client’s upcoming invoice. I’m having difficulty obtaining the invoice in the first place. Though I’ve found the undocumented public function "upcomingInvoice," I can’t get any of its protected properties out. Even with it, I’m having trouble understanding how to use the poorly documented ..

Read more

I’m looking to collect a customers card information then save it to charge later after they have consumed my service. I’m following the exact same steps on: https://stripe.com/docs/payments/save-and-reuse but somehow I’m stuck on the error: “Missing required param: payment_method_data[card].” My steps are as below: A customer creates an account and these details are saved to ..

Read more

Hello i am using stripe package(composer require stripe/stripe-php) for integrate stripe payment getaway in my website. I am using this code for charge user. public function stripe(Request $request){ $customer = json_decode(Session::get(‘customer’)); if (Cart::getContent() == null || $customer == null){ return redirect()->back(); } $cartCollection = Cart::getContent(); $shippingCost=0; foreach ($cartCollection as $getSingleCartProduct){ $shippingCost += $getSingleCartProduct->attributes->unit_charge; } $total_price ..

Read more

I am transferring fund from stripe account to connect account using payout api my code is: $payout = StripePayout::create([ ‘amount’ => 500, ‘currency’ => ‘aud’, ‘description’ => ‘first payout payment transfer on stripe’, ‘destination’ => ‘bank_id’, ‘method’ => ‘instant’, ‘source_type’ => ‘bank_account’, ‘statement_descriptor’ => ‘first payout payment transfer on stripe ‘, ]); after hit this ..

Read more

When I use test key then form showing stripe input file: <script src=”https://js.stripe.com/v3/”></script> <div class=”form-row”> <label for=”card-element”> </label> <div id=”card-element”> <!– A Stripe Element will be inserted here. –> </div> <!– Used to display form errors. –> <div id=”card-errors” role=”alert”></div> </div> And when I set the live key, then the form is not showing the ..

Read more

Why are methods not found in Authenticatable? Im using Laravel 6 Cashier 10 with Stripe API. Please see the following errors in my Subscription Controller. Method ‘createSetupIntent’ not found in IlluminateContractsAuthAuthenticatable|null Method ‘addPaymentMethod’ not found in IlluminateContractsAuthAuthenticatable|null Unhandled StripeExceptionApiErrorException The above errors show in up in PHP storm. When the code is actually ran in ..

Read more