lib/AktiveMerchant/Billing/Gateways/FatZebra.php
public function purchase($money, $creditcard, $options = array())
    {

        Options::required('order_id, ip', $options);

        $this->post = array();

        $options = new Options($options);

        $this->addInvoice($options->order_id, $money);

        if (is_string($creditcard)) {
            Options::required('cvv', $options);
            $this->post['card_token'] = $creditcard;
        } else {
            $this->addCreditcard($creditcard);
        }

        $this->addCustomerData($options);

        return $this->commit('purchases');
    }
public function purchase($money, $creditcard, $options = array())
    {

        Options::required('order_id, ip', $options);

        $this->post = array();

        $options = new Options($options);

        $this->addInvoice($options->order_id, $money);

        if (is_string($creditcard)) {
            Options::required('cvv', $options);
            $this->post['card_token'] = $creditcard;
        } else {
            $this->addCreditcard($creditcard);
        }

        $this->addCustomerData($options);

        return $this->commit('purchases');
    }
public function purchase ( $ money , $ creditcard , $ options = array ( ) ) { Options :: required ( 'order_id, ip' , $ options ) ; $ this -> post = array ( ) ; $ options = new Options ( $ options ) ; $ this -> addInvoice ( $ options -> order_id , $ money ) ; if ( is_string ( $ creditcard ) ) { Options :: required ( 'cvv' , $ options ) ; $ this -> post [ 'card_token' ] = $ creditcard ; } else { $ this -> addCreditcard ( $ creditcard ) ; } $ this -> addCustomerData ( $ options ) ; return $ this -> commit ( 'purchases' ) ; }
Charge a credit card.

@param number              $money      Amount of money to charge
@param CreditCard | string $creditcard Credit card to charge or a token
from a stored credit card
@param array               $options    The order_id reference and coustomer ip.
@access public
@throws \AktiveMerchant\Billing\Exception If the request fails
@return \AktiveMerchant\Billing\Response Response object
Charge a credit card .