예제 #1
0
 /**
  * @param string $url
  * @param int $http_status
  * @param string $message
  * @param string $body
  */
 function __construct($url, $http_status, $message, $body = '')
 {
     parent::__construct('Connection to Payment Gateway failed.', $message);
     $this->url = $url;
     $this->http_status = $http_status;
     $this->body = \Hypercharge\Helper::stripCc($body);
 }
 function __construct($data = array())
 {
     $future = new \DateTime('now', new \DateTimeZone('UTC'));
     $future->add(new \DateInterval('P1Y'));
     $default = array('payment_method' => 'credit_card', 'card_holder' => 'Pierre Partout', 'card_number' => '4200000000000000', 'cvv' => '667', 'expiration_year' => $future->format('Y'), 'expiration_month' => $future->format('m'));
     $data = array_merge($default, $data);
     Helper::assign($this, $data);
 }