For example, if a customer cancels a subscription on March 1st, but the subscription was not scheduled to end until March 5th, the subscribed method will continue to return true until March 5th.You may determine
So, in the example above, the user will be retrieved by the value of the email column. If the user is found, the hashed password stored in the database will be compared with the password value passed to the method via the array. You should not hash the incoming request's password ...
So, for example, when a user cancels their subscription via Stripe's Customer Billing Portal, Cashier will receive the corresponding webhook and mark the subscription as "canceled" in your application's database.CustomersRetrieving CustomersYou can retrieve a customer by their Stripe ID using the ...
To interact with SES's subscription management features, you may return the X-Ses-List-Management-Options header in the array returned by the headers method of a mail message:1/** 2 * Get the message headers. 3 */ 4public function headers(): Headers 5{ 6 return new Headers( 7 text:...
1if ($user->subscription('main')->onTrial()) { 2 // 3}The subscribedToPlan method may be used to determine if the user is subscribed to a given plan based on a given Stripe / Braintree plan ID. In this example, we will determine if the user's main subscription is actively ...
if ($user->subscription('main')->onTrial()) { // }CopyThe subscribedToPlan method may be used to determine if the user is subscribed to a given plan based on a given Stripe / Braintree plan ID. In this example, we will determine if the user's main subscription is actively ...
For example, if a user cancels a subscription on March 5th that was originally scheduled to expire on March 10th, the user is on their "grace period" until March 10th. Note that the subscribed method still returns true during this time:if ($user->subscription('default')->onGracePeriod()...
The above code was a simple example of a payment method for the subscription. Likewise, through Laravel Cashier one can also create payment methods for single charges. The difference between the methods of payment basically highlights the limitation of Stripe. The customer, for a single charge, ...
After a user is subscribed to your application, they may occasionally want to change to a new subscription plan. To swap a user to a new subscription, use theswapmethod. For example, we may easily switch a user to thepremiumsubscription: ...
This is where laravel packages comes in to the play. Laravel Packages are primarily the way of adding functionality to Laravel. Packages can be anything, it might be something that works with for example authorization or something else.