/**
* @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");
}
}