Beispiel #1
0
 /**
  * @param Helper\CreditCard $creditCard
  */
 public function saveCard(Helper\CreditCard $creditCard)
 {
     $this->api('/profiles', Enum\HttpMethod::POST, ['card' => ['complete' => true, 'name' => $creditCard->getName(), 'number' => $creditCard->getCardNumber(), 'expiry_month' => $creditCard->getCardExpiry()->format('m'), 'expiry_year' => $creditCard->getCardExpiry()->format('y'), 'cvd' => $creditCard->getCardCVV()], 'billing' => ['name' => $creditCard->getName(), 'address_line1' => $creditCard->getAddress1(), 'address_line2' => $creditCard->getAddress2(), 'city' => $creditCard->getCity(), 'province' => $creditCard->getState(), 'country' => $creditCard->getCountry(), 'postal_code' => $creditCard->getZipCode(), 'phone_number' => $creditCard->getPhoneNumber(), 'email_address' => $creditCard->getEmailAddress()]]);
     if ($this->getLastHttpStatusCode() === 200) {
         $this->getLastResponse()['expiry'] = $creditCard->getCardExpiry();
     }
 }
Beispiel #2
0
 /**
  * @param Helper\CreditCard $creditCard
  */
 public function saveCard(Helper\CreditCard $creditCard)
 {
     $this->api('/customers', Enum\HttpMethod::POST, ['card' => ['number' => $creditCard->getCardNumber(), 'exp_month' => $creditCard->getCardExpiry()->format('m'), 'exp_year' => $creditCard->getCardExpiry()->format('Y'), 'cvc' => $creditCard->getCardCVV(), 'name' => $creditCard->getName(), 'address_line1' => $creditCard->getAddress1(), 'address_line2' => $creditCard->getAddress2(), 'address_city' => $creditCard->getCity(), 'address_zip' => $creditCard->getState(), 'address_state' => $creditCard->getZipCode(), 'address_country' => $creditCard->getCountry()]]);
 }
Beispiel #3
0
 /**
  * @param Helper\CreditCard $creditCard
  * @param Helper\Transaction $transaction
  */
 public function createCharge(Helper\CreditCard $creditCard, Helper\Transaction $transaction)
 {
     $this->api('auth', ['orderID' => $transaction->getTransactionId(), 'authtype' => 'authonly', 'card-amount' => number_format($transaction->getAmount(), 2, '.', ''), 'card-name' => $creditCard->getName(), 'card-address1' => $creditCard->getAddress1(), 'card-address2' => $creditCard->getAddress2(), 'card-city' => $creditCard->getCity(), 'card-state' => $creditCard->getState(), 'card-zip' => $creditCard->getZipCode(), 'card-country' => $creditCard->getCountry(), 'card-number' => $creditCard->getCardNumber(), 'card-exp' => $creditCard->getCardExpiry()->format('m/y'), 'card-cvv' => $creditCard->getCardCVV(), 'currency' => $transaction->getCurrencyCode(), 'ipaddress' => isset($_SERVER) && array_key_exists('REMOTE_ADDR', $_SERVER) ? $_SERVER['REMOTE_ADDR'] : null, 'paymethod' => 'credit']);
 }
 /**
  * @param Helper\CreditCard $creditCard
  */
 public function saveCard(Helper\CreditCard $creditCard)
 {
     $this->api('Profile', ['CustomerName' => $creditCard->getName(), 'CustomerAddress1' => $creditCard->getAddress1(), 'CustomerAddress2' => $creditCard->getAddress2(), 'CustomerCity' => $creditCard->getCity(), 'CustomerState' => $creditCard->getState(), 'CustomerZIP' => $creditCard->getZipCode(), 'CustomerPhone' => $creditCard->getPhoneNumber(), 'CustomerCountryCode' => $creditCard->getCountryCode(), 'CCAccountNum' => $creditCard->getCardNumber(), 'CCExpireDate' => $creditCard->getCardExpiry()->format('my'), 'CustomerProfileAction' => Enum\ChasePaymentech::CUSTOMER_PROFILE_ACTION_CREATE, 'CustomerAccountType' => Enum\ChasePaymentech::CUSTOMER_ACCOUNT_TYPE_CREDIT_CARD, 'CustomerProfileFromOrderInd' => Enum\ChasePaymentech::CUSTOMER_PROFILE_GENERATION_AUTO, 'CustomerProfileOrderOverrideInd' => Enum\ChasePaymentech::CUSTOMER_PROFILE_ORDER_OVERRIDE_MAPPING_NONE]);
 }