示例#1
0
 /**
  * Maintain the days left of the current trial (if applicable).
  *
  * @return \Laravel\Cashier\StripeGateway
  */
 public function maintainTrial()
 {
     if ($this->billable->readyForBilling()) {
         if (!is_null($trialEnd = $this->getTrialEndForCustomer($this->getStripeCustomer()))) {
             $this->calculateRemainingTrialDays($trialEnd);
         } else {
             $this->skipTrial();
         }
     }
     return $this;
 }