Scalr_Billing::updateCreditCard PHP Method

updateCreditCard() public method

public updateCreditCard ( $ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $fName, $lName, $postalCode )
    public function updateCreditCard($ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $fName, $lName, $postalCode)
    {
        return $this->chargify->updateSubscription($this->subscriptionId, $ccNumber, $ccCvv, $ccExpMonth, $ccExpYear, $fName, $lName, $postalCode);
    }

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::updateCreditCard