Questions tagged [laravel-cashier]

1

votes
0

answer
115

Views

Laravel cashier for Braintree and Stripe

I am trying to use Laravel cashier for both Braintree and Stripe. I have to use both payment gateways at a time. Can i achieve this with cashier? For subscription i'm using. Braintree $user->newSubscription('paypalPlaneName', $paypal_plan_id)->create($nonce); And same as with Stripe $user->newSubscr...
cyrano test
1

votes
1

answer
196

Views

Laravel cashier webhook

I was wonder if someone could help point in the right direction with laravels cashier (stripe) webhook. I want to be able to update a column in the subscription database. I have tried over riding the webhook like the laravel documentation says however i believe what i am trying do isnt going to work...
James Hayes
0

votes
0

answer
3

Views

Laravel Cashier Invoice Date Issue

I am using Laravel 5.8 with Laravel Cashier. When I try to show a list of invoices of a user, I used this code: @foreach (Auth::user()->invoices() as $invoice) {{ $invoice->date()->toFormattedDateString() }} {{ $invoice->total() }} Download @endforeach However, the line $invoice->date()->toFormatted...
James Arnold
1

votes
1

answer
376

Views

Laravel Cashier Quantity Increment Update Doesnt Work

I am trying to implement the quantity increment with the Laravel Cashier which uses Stripe. I am able to set the quantity when I create a new subscription like this: // THIS WORKS! $user = User::find(4); $user->subscription('monthly')->quantity(5)->create($token); But when I try to update the quant...
Neel
1

votes
1

answer
123

Views

Laravel 5.1 and Cashier not interacting with $user as expected

When I register a new user, Cashier's methods work fine to register that user. For instance, I have this in my User model: public static function registerUser() { $user = new User; $stripeToken = Input::get('stripeToken'); $user->subscription('yearly')->create($stripeToken); $user->save(); } I also...
user3089840
1

votes
2

answer
277

Views

Laravel Cashier Stripe API method calls is an optional per-request apiKey

I hope some one can help me, Im using Laravel 5.2 and Cashier 6, and Im getting this error Api in RequestOptions.php line 77: The second argument to Stripe API method calls is an optional per-request apiKey, which must be a string, or per-request options, which must be an array. (HINT: you can set a...
user3466947
1

votes
1

answer
166

Views

Laravel Cashier Call to Undefined Method onGracePeriod()

So I recently upgraded from Laravel 5.1 -> 5.4 and Cashier from 5.0 -> 7.0. In my blade I am using this check to see if a user is in their grace period However now this code throws an exception Call to undefined method Illuminate\Database\Query\Builder::onGracePeriod() As per the documentation my us...
CMOS
1

votes
1

answer
454

Views

Laravel - Stripe - Ultrahook - Webhook are not caught

I'm using Laravel 5.4 and Laravel Cashier. I would like to be able to catch Stripe webhooks in my localhost:8888 To do so I installed ultrahook and I started it like this Ultrahook http://stripe.leococo.ultrahook.com -> http://localhost:8888/stripe/webhook Laravel routes Route::post('stripe/webhook'...
Léo Coco
1

votes
2

answer
521

Views

Laravel cashier + Stripe : creating a plan with quantity and decreasing prices

I'm whiling for one of my project to create a subscription system with Laravel Cashier and Stripe. We will offer one plan to our users : 10€ / month for one location (they can add locations in the system) and for 75 followers. What I want to do, is to make them pay more for locations : 2.5€ /...
Zero
1

votes
1

answer
173

Views

Laravel 5.4 Cashier add subscription

I've followed Laravel docs exactly for creating a new subscription via Cashier. My controller looks like this: public function saveSubscription(Request $request) { $plan = Plan::find($request->input('plan')); //$user_id = Auth::id(); //$user = User::find($user_id); // work but ugly //$user = $reques...
user101289
1

votes
1

answer
347

Views

Laravel app.js stops Stripe payment form from showing

I'm trying to accept payments with Stripe. I got the code from the Stripe documentation and added it to a view. When I click the button it doesn't show the form, but instead goes to the form action page (payments). Staff I Stripped everything way down to eliminate everything a left only the button,...
bwoogie
1

votes
1

answer
77

Views

Braintree create subscription with dynamic price

I am building a donation page where I want the user to decide the amount and frequency of the donation for hisself. I looked up in the Braintree documentation, and I couldn't find out if and how to pass the amount of the subscription. I am asking now how can I override the amount of the subscription...
arakibi
1

votes
1

answer
444

Views

Laravel not applying coupon using Billing/Cashier

I am trying to apply a coupon to a user’s subscription upon creation. To do this I am using the following code: $user = Auth::user(); if(!empty($request->coupon)){ $user->subscription('monthly')->withCoupon($request->coupon)->create($request->stripeToken); } else { $user->subscription('monthly')->...
Mike
1

votes
1

answer
399

Views

Laravel Cashier - Update card generates a new stripe user + id

I'm using Laravel's Cashier to handle my subscription plans on Laravel 5.1. Every time I change the user's card with $user->updateCard($stripeToken); a new customer is generated on Stripe, with a new card, new id but same e-mail, when in reality it should just update a customer's card. I've looked...
raphadko
1

votes
1

answer
376

Views

How to handle different plan options with Stripe?

I'm using Laravel and Stripe. I have 5 different subscription plans in my app. Each plan has its own set of options, like Basic Plan - max campaigns - 20 - max emails - 100 Pro Plan - max campaigns - 40 - max emails - 200 etc. How do I represent those options in my DB? I use Laravel's cashier, it...
Almazik G
1

votes
2

answer
492

Views

How to use Braintree Webhooks in Laravel

I am using the Braintree for Payment Process. I have created a subscrition plan and I am using PayPal and Card Payment in My Site. I was able to create a Successful subscription, But I want to show the get the response when the subscription is active/canceled and payment done or not. I know this can...
Elsie Hamilton
1

votes
1

answer
679

Views

PHP Trait Override Protected Trait Method

I am having problems with a composer package I am dealing with. It implements a trait Billable. trait Billable { /** * Update the payment method token for all of the user's subscriptions. * * @param string $token * @return void */ protected function updateSubscriptionsToPaymentMethod($token) { for...
Ben Ganley
1

votes
1

answer
65

Views

laravel cashier braintree expiry date

I am using 'laravel/cashier-braintree': '~2.0' package to manage subscriptions in my Laravel 5.5.40 application. So far i have created a plan to and created subscriptions to the plans via multiple users. I just cant find a way to get the plan expiry date for a user. Based on this laracast discussio...
Avshek
0

votes
0

answer
6

Views

Received unknown parameters in Laravel, Cashier and Stripe

Before we start I'm using these versions: 'laravel/framework': '5.4.*' 'laravel/cashier': '~7.0' I'm getting the Stripe test token back in on my Vue.js front-end fine then sending it back to the Laravel API. It's creating a customer in Stripe and saving the stripe_id on my User table. But I'm gettin...
Jack Barham
1

votes
2

answer
2.1k

Views

Laravel Cashier - How to Check if Stripe Payment was Successful

I am using Cashier in Laravel 5.1 for stripe payment. I want to check how to create a new database entry only when the stripe payment is successful. I am doing something like this: if ($user->subscribed()) { $subscribe = $user->subscription()->increment($totalQuantity); } else { $subscribe = $user->...
Neel
1

votes
1

answer
101

Views

Parsing a JSON array in PHP

I am a beginner in working with JSON, so please bear with me. Basically, I am receiving this JSON array back from Stripe, which is great (and I don't believe there is any sensitive information in it as it's a test account with a bogus credit card number and no keys listed). Basically, at this point...
user3089840
1

votes
1

answer
307

Views

Laravel invoice error

Using Laravel 5.2, I'm generating a list of invoices which works fine with the following code: $owner = User::where('accountId',Auth::user() ->accountId) ->where('owner',1) ->first(); $invoices = $owner->invoices(); However when I try to download the invoice return $this->owner->downloadInvoice($id,...
Dan
2

votes
1

answer
235

Views

Laravel Cashier Without Subscription

I have following requirement. App user A calls another user B and if the user B attends the call, $1 has to be debited from his credit card. Card details will be collected during the registration step. There is no subscription involved in the process. Do I need to use Laravel cashier for this?
Kiren Siva
2

votes
0

answer
187

Views

Laravel 5.1 Cashier - Adds customer but without info

I am using Laravel 5.1 trying to set it up with Stripe using Cashier. I am using a custom button to execute the javascript (using Angular): $scope.subscribe = function(plan){ var handler = StripeCheckout.configure({ key: 'pk_test_*************', image: '/img/documentation/checkout/marketplace.png',...
noland
5

votes
2

answer
960

Views

Unable to generate a Cashier PDF in Laravel

I am using Laravel 5 to generate a PDF from a subscription generated from Cashier. The docs say this is as simple as calling: return $user->downloadInvoice($invoice->id, [ 'vendor' => 'Your Company', 'product' => 'Your Product', ]); Unfortunately I'm getting an odd error: No hint path defined for...
Mike
4

votes
1

answer
1.3k

Views

Laravel: Integrate Braintree with Cashier

Just curious, Does someone has successfully integrated Braintree using laravel/cashier-braintree ? I'm stuck at the beginning with: $user->newSubscription('main', 'monthly')->create($creditCardToken); Following the documentation, I guess to need something like that: $data = [ 'firstName' => $request...
François Laurent
2

votes
1

answer
274

Views

How to remove coupon from Stripe plan w/ Laravel Cashier 4

I am currently trying to implement a method that swaps people over to a new plan. The problem I am having is that the coupon from the old plan carries over and the user is not charged. Every time I try to remove the old coupon, it doesn't seem to allow it. protected function swapToYearlyPlan(){ $use...
Marcel
2

votes
1

answer
253

Views

How to upgrade/swap subscriptions when using subscription taxes with Laravel Cashier

Laravel Cashier makes it pretty simple to create subscriptions with subscription taxes, but I have found that when it comes to swapping subscriptions, it can't deal with taxes in that context. Have you ran into this issue? How did you go about addressing it?
Marcel
2

votes
1

answer
435

Views

laravel cashier - save creditcard last 4 number and expire date

I'm using laravel 5.2 with cashier package this is the form that i'm using in order to get the client creditcard token: after it the form is submitted automatically And i get the regular answer from the server that contain the client token. How i can save the credit-card last 4 number and expire dat...
Dani Banai
2

votes
1

answer
221

Views

Laravel - Cashier | swap() and cancelNow() on null

Basically I have this problem which keeps occuring. Once a user subscribes, it all works fine. He can cancel/change subscription no problem. However, once they have changed their subscription once, I cant call swap or cancel without it throwing an error on null Call to a member function cancelNow...
e4stwood
2

votes
2

answer
926

Views

“Extend” a user's subcription with Stripe using Laravel cashier?

I'm using Stripe to manage a subscription service, and Laravel Cashier as my API interface for Stripe's services. I have a situation where I want to sign a user up to a service, and then occasionally, extend their subscription beyond the original subscription end date by an arbitrary amount. This is...
ReactingToAngularVues
2

votes
1

answer
385

Views

Laravel 5.3, Cashier - Braintree - Single Charges

I followed the Laravel docs to implement the Cashier but I can't get it to work. In short: made and migrated migrations added Billable to my User.php model added keys to my .env, referred to them in my config/services.php and added the SDK calls to my AppServiceProvider.php If needed I can paste the...
dbr
2

votes
0

answer
278

Views

Laravel Cashier Stripe Trial creates new subscriptions, allows exploit

I am using Laravel Cashier to add stripe payments (subscriptions) for the premium version of my web app. Users are offered a 5-day free trial (card in advance). Now what happens is, I create a subscription using: $user->newSubscription('premium','monthly')->trialDays(5)->create($stripeToken,['email'...
raphadko
6

votes
1

answer
404

Views

Laravel 5 and Cashier on Company table

I am new to laravel and have been working with cashier for a web app I am developing. In my app a user creates their account and company and they are allowed to use the app. Because a company can have many users, I need cashier to check if the company has a subscription or not. In the cashier docs...
Derek
2

votes
1

answer
1.4k

Views

Subscriptions in Braintree with laravel/cashier-braintree / Laravel 5.2

Need to integrate laravel/cashier-braintree in my Laravel app. Having pretty much no experience with Braintree integration it's really hard to make it work. Can somebody explain in steps how it works, or some tutorial that would be good for this? Tried to follow integration for Stripe, cause they ar...
Verse
2

votes
1

answer
181

Views

Stripe billing with same price as form

So I wish to bill customers (who are not users) the same amount as what is displayed in the stripe form {!! csrf_field() !!} In the form the price displayed is the price listed in the relevant note model * 100. I would like the customer to actually be billed this value, it will change depending upon...
DanielPahor
2

votes
1

answer
407

Views

Laravel Cashier Braintree cancel subscription graceperiod

I am using laravel cashier to create a subscription based plan purchasing system with Braintree as a payment gateway. My subscriptions are successfully created, my issue is when canceling. After I fire: $user->subscription('pro')->cancel(); The user is successfully transitioned into the grace period...
matpulis
5

votes
2

answer
192

Views

Laravel Cashier Events

I'm using Laravel cashier 7.0, and I'd like to fire some methods after a subscription is successful. I hoped there would be some events I could listen for, but that doesn't seem to be the case (unless I missed them). Stripe's the payment provider I'm using, if that makes a difference. (stripe-php pa...
Daniel Dewhurst
2

votes
2

answer
215

Views

L4.2 Extend/override Cashier to add Tax feature

I am using Laravel 4.2 with Cashier and I need to modify its protected function buildPayload() but I don't want to do it directly in the vendor file as I could break the code when I composer Update... How should I proceed to override this function with my own Logic ? I currently use Cashier in one o...
raphjutras
2

votes
0

answer
332

Views

Laravel cashier list all invoices and total

I have a subscription platform with Laravel Cashier and Stripe. I am trying to create an admin backend where the Admin can see all subscription payments made and also the total amount the site has generated in subscriptions. I was able to roughly get a list of payments (through the invoices) as foll...
Alex

View additional questions