Category : stripe-payments

Must provide source or customer. laravel 8 stripe payment gateway StripeController public function stripe() { return view(‘stripe’); } public function stripePost(Request $request) { StripeStripe::setApiKey(env(‘STRIPE_SECRET’)); StripeCharge::create ([ "amount" => 100*100, "currency" => "INR", "source" => $request->stripeToken, "description" => "This payment is testing purpose of websolutionstuff.com", ]); Session::flash(‘success’, ‘Payment Successful !’); return back(); } Sourc..

Read more

really struggling to find the error where i missed. I am using Laravel (v8), Vue (v2) and Stripe(v3) for my e-commerce web-app. I implemented stripe in TEST mode successfully and it was working perfectly fine. And when I switched for live mode I am getting the following error: No such PaymentMethod: ‘pm_1Yyl5xC4bpPAffpGV2p0ZL12’. Front and backend ..

Read more

I have registered the job under: ‘jobs’ => [ ‘charge_succeeded’ => AppJobsStripeWebhooksChargeSucceeded::class // ‘source_chargeable’ => AppJobsStripeWebhooksHandleChargeableSource::class, // ‘charge_failed’ => AppJobsStripeWebhooksHandleFailedCharge::class, ], And in the class: class StripeWebHooksChargeSucceeded implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; public $webHookCall; /** * Create a new job instance. * * @return void */ public function __construct(WebhookCall $webHookCall) { $this->webHookCall ..

Read more

I am creating a stripe checkout session for my subscription based product price like this. $request->user()->createOrGetStripeCustomer(); $array = [ ‘customer’ => $request->user()->stripe_id, ‘payment_method_types’ => [‘card’], ‘line_items’ => [[ ‘price’ => $plan->stripe_plan, ‘quantity’ => 1, ]], ‘mode’ => ‘subscription’, ‘success_url’ => route(‘success’), ‘cancel_url’ => route(‘cancel’), ]; StripeStripe::setApiKey(‘sk_test_KEY’); $session = StripeCheckoutSession::create($array); On the view, I am redirecting ..

Read more

{ "id": "tok_1IsT8kEsWwtF0krez5cw74gI", "object": "token", "card": { "id": "card_1IsT8kEsWwtF0kre4Fq0ChK1", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": null, "address_zip_check": null, "brand": "Visa", "country": "PK", "cvc_check": "unchecked", "dynamic_last4": null, "exp_month": 2, "exp_year": 2023, "fingerprint": "rLiMzo6zB4GQuv57", "funding": "debit", "last4": "8403", "metadata": { }, "name": null, "tokenization_method": null }, "client_ip": "199.188.200.224", ..

Read more

I am using Laravel 5.8 the server quickstart example to send a user to Stripe to make a payment. I need to create a solution for users to buy credits. https://stripe.com/docs/checkout/integration-builder My HTML: <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search"> <div class="input-group"> <div class="input-group-append"> <button id="checkout-button" class="btn btn-danger" type="button"> Buy Credits </button> ..

Read more

I’ve run command ‘composer require stripe/stripe-php’ I am getting this error —- Class ‘Stripe’ not found. Here’s my controller- namespace AppHttpControllers; use IlluminateHttpRequest; use Validator; class StripeController extends Controller { public function stripePost(Request $request) { StripeStripe::setApiKey ( ‘sk_test_51IqDEDyMvZ4TU4ArtfN0olk7c9oXEGgATFIueO8SIEmrTv3vZFEMgBXOy4wNNCCSA4lueR84PyEwbzpp6W2QW’ ); try { StripeCharge::create ( array ( "amount" => $request->amount * 100, "currency" => "usd", "source" => ..

Read more

I am new to laravel cashier, and I am stuck here. For my games, users can subscribe. I have 3 subscription methods. Monthly Yearly One-time. For monthly and Yearly subscriptions, I have used the below code and it works perfectly. $subscription = $user->newSubscription($subscriptionName, $plan->stripe_id)->withMetaData([‘game’ => $game->name])->create(null, [ ’email’ => $user->email, ‘name’ => $user->name, [‘metadata’ => ..

Read more

I’m trying to get client_secret to be used in Mobile device to make stripe payment successful. Here is the code how I’m calling Intent StripeStripe::setApiKey(‘KEY_HERE’); try { $intent = StripePaymentIntent::create([ ‘amount’ => 109, ‘currency’ => ‘usd’, ]); $client_secret = $intent->client_secret; return response()->json([ ‘success’ => true, ‘client_secret’ => $client_secret, ‘message’ => null ]); } catch (CardException ..

Read more

I am following Laravel’s Cashier on SCA and can see that Striple handles "3D Secure" payment verifications for you. The issue I have is that the payment works fine, however, the Laravel user is never updated to be on that subscription because of the redirect back to Stripe. Route::post(‘/dashboard/payment/subscribe’, function (Request $request) { $request->user()->updateDefaultPaymentMethodFromStripe(); if ..

Read more