Scalr_Billing::reactivateSubscription PHP Method

reactivateSubscription() public method

    public function reactivateSubscription()
    {
        $retval = $this->chargify->reactivateSubscription($this->subscriptionId);
        $this->account->status = Scalr_Account::STATUS_ACTIVE;
        $this->account->save();
        return true;
    }

Usage Example

Example #1
0
 /**
  * @param string $ccNumber
  * @param string $ccCvv
  * @param string $ccExpMonth
  * @param string $ccExpYear
  * @param string $firstName
  * @param string $lastName
  * @param string $postalCode
  * @throws Exception
  */
 public function xUpdateCreditCardAction($ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $firstName, $lastName, $postalCode)
 {
     $info = $this->billing->getInfo();
     if (!$info['ccType'] && in_array($info['realState'], array('Canceled', 'Trial_ended', 'Unpaid'))) {
         $reActivate = true;
     }
     $this->billing->updateCreditCard($ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $firstName, $lastName, $postalCode);
     if ($reActivate) {
         $this->billing->reactivateSubscription();
         $this->response->success("Subscription successfully re-activated");
     } else {
         $this->response->success("Credit card details successfully updated");
     }
 }
All Usage Examples Of Scalr_Billing::reactivateSubscription