Category : stripe-payments

In Stripe if I make a plan in INR currency then subscription working fine but when I make a plan on USD that time issues come in Laravel by using cashier This is a function when I submit card details $plan = Plan::findOrFail($request->get(‘plan’)); $user = $request->user(); $paymentMethod = $request->paymentMethod; $user->createOrGetStripeCustomer(); $user->updateDefaultPaymentMethod($paymentMethod); $user->newSubscription(‘default’, $plan->stripe_plan) ->create($paymentMethod, [ ..

Read more

So my client has a discord bot that manages discord servers on behalf of the user. The relationship on the Laravel end is each User model hasMany() Server models. Each of those Server models may either be on the free plan, or a paid subscription plan on a per-Server basis. So a User might have ..

Read more

i want to create subscription for my customer i am able to create customer but when i try to create subscription it show me the error Undefined property: CartalystStripeStripe::$subscriptions following is my code to create subscription public function createStripeSubscription($customerId,$curPackage,$type,$stripe){ $response = $stripe->subscriptions->create([ ‘customer’ =>$customerId, ‘items’ => [ [‘price’ => $curPackage->getPriceId($type)], ], ]); dd($response); } i ..

Read more

I have a Laravel Spark Classic project that requires a $25 per month base subscription and then an additional $5 per team member (Spark::chargeTeamsPerMember()) implementation. The per member set up is currently in place, Stripe hooked up, all working swell — just wanted to know if it’s possible to add (either through Stripe or through ..

Read more

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