Beispiel #1
0
 /**
  * Adds a CreditCard object
  *
  * @param CreditCard $creditcard
  * @param array reference $post
  */
 private function add_creditcard(CreditCard $creditcard, $options)
 {
     $credit = array('CardDetails' => array('CardName' => $creditcard->name(), 'CV2' => $creditcard->verification_value, 'CardNumber' => $creditcard->number, 'ExpiryDate' => array('@attributes' => array('Month' => $this->cc_format($creditcard->month, 'two_digits'), 'Year' => $this->cc_format($creditcard->year, 'two_digits')))));
     return $credit;
 }
 /**
  *
  * @param CreditCard $creditcard
  */
 private function add_creditcard(CreditCard $creditcard)
 {
     $this->post['CardName'] = $creditcard->name();
     $this->post['CardNumber'] = $creditcard->number;
     $this->post['ExpiryDateMM'] = $this->cc_format($creditcard->month, 'two_digits');
     $this->post['ExpiryDateYY'] = $this->cc_format($creditcard->year, 'two_digits');
     if ($this->requires_start_date_or_issue_number($creditcard)) {
         $this->post['StartDateMM'] = $this->cc_format($creditcard->start_month, "two_digits");
         $this->post['StartDateYY'] = $this->cc_format($creditcard->start_year, "two_digits");
         $this->post['IssueNumber'] = $creditcard->issue_number;
         $this->post['CV2'] = $creditcard->verification_value;
     }
 }
Beispiel #3
0
 private function add_recurring_creditcard(CreditCard $creditcard)
 {
     $post['card_holder'] = $creditcard->name();
     $post['card_number'] = $creditcard->number;
     $post['expiry_date'] = $this->cc_format($creditcard->month, 'two_digits') . "/" . $this->cc_format($creditcard->year, 'four_digits');
     $post['cvv'] = $creditcard->verification_value;
     $this->post['card'] = $post;
 }
    /**
     *
     * @param CreditCard $creditcard
     */
    private function add_creditcard(CreditCard $creditcard)
    {
        $month = $this->cc_format($creditcard->month, 'two_digits');
        $cardholdername = strtoupper($creditcard->name());
        $this->post .= <<<XML
      <ns:CardInfo>
        <ns:CardType>{$this->CARD_MAPPINGS[$creditcard->type]}</ns:CardType>
        <ns:CardNumber>{$creditcard->number}</ns:CardNumber>
        <ns:CardHolderName>{$cardholdername}</ns:CardHolderName>
        <ns:ExpirationMonth>{$month}</ns:ExpirationMonth>
        <ns:ExpirationYear>{$creditcard->year}</ns:ExpirationYear>
        <ns:Cvv2>{$creditcard->verification_value}</ns:Cvv2>
        <ns:Aid/>
        <ns:Emv/>
        <ns:PinBlock/>
      </ns:CardInfo>
XML;
    }
Beispiel #5
0
 /**
  * Adds a CreditCard object
  *
  * @param CreditCard $creditcard
  */
 private function add_creditcard(CreditCard $creditcard)
 {
     $this->post['CardNumber'] = $creditcard->number;
     $this->post['CardExpiryMonth'] = $this->cc_format($creditcard->month, 'two_digits');
     $this->post['CardExpiryYear'] = $this->cc_format($creditcard->year, 'two_digits');
     $this->post['CustomerFirstName'] = $creditcard->first_name;
     $this->post['CustomerLastName'] = $creditcard->last_name;
     $this->post['CardHoldersName'] = $creditcard->name();
     if ($creditcard->verification_value) {
         $this->post['CVN'] = $creditcard->verification_value;
     }
 }