Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Change "name" column to "type" (laravel#1620)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored and QuentinGab committed Mar 16, 2024
1 parent 39a1d0b commit 7a2343a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SubscriptionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SubscriptionBuilder
protected $owner;

/**
* The type of the subscription.
* The name of the subscription.
*
* @var string
*/
Expand Down Expand Up @@ -105,7 +105,7 @@ public function price($price, $quantity = 1)

$quantity = $price['quantity'] ?? $quantity;

if (! is_null($quantity)) {
if (!is_null($quantity)) {
$options['quantity'] = $quantity;
}

Expand Down Expand Up @@ -309,7 +309,7 @@ protected function createSubscription(StripeSubscription $stripeSubscription)
'stripe_status' => $stripeSubscription->status,
'stripe_price' => $isSinglePrice ? $firstItem->price->id : null,
'quantity' => $isSinglePrice ? ($firstItem->quantity ?? null) : null,
'trial_ends_at' => ! $this->skipTrial ? $this->trialExpires : null,
'trial_ends_at' => !$this->skipTrial ? $this->trialExpires : null,
'ends_at' => null,
]);

Expand Down Expand Up @@ -339,7 +339,7 @@ public function checkout(array $sessionOptions = [], array $customerOptions = []
throw new Exception('At least one price is required when starting subscriptions.');
}

if (! $this->skipTrial && $this->trialExpires) {
if (!$this->skipTrial && $this->trialExpires) {
// Checkout Sessions are active for 24 hours after their creation and within that time frame the customer
// can complete the payment at any time. Stripe requires the trial end at least 48 hours in the future
// so that there is still at least a one day trial if your customer pays at the end of the 24 hours.
Expand Down

0 comments on commit 7a2343a

Please sign in to comment.