public function process($data, $config)
 {
     $user = $config['user'] != '' ? $config['user'] : $config['merchant_id'];
     $payflow = new PayFlow($config['merchant_id'], $config['partner_id'], $user, $config['password'], 'single');
     $environment = $config['sandbox'] == "TRUE" ? 'test' : 'live';
     $payflow->setEnvironment($environment);
     $payflow->setTransactionType('S');
     $payflow->setPaymentMethod('C');
     $payflow->setPaymentCurrency($this->_config["currency"]);
     $payflow->setAmount($data["order_total"], FALSE);
     $payflow->setCCNumber($data["payflow_cc_num"]);
     $payflow->setCVV($data["payflow_cc_code"]);
     $payflow->setExpiration($data["payflow_cc_month"] . $data["payflow_cc_year"]);
     $payflow->setCreditCardName($data["payflow_cc_name"]);
     $payflow->setCustomerFirstName($data["br_billing_fname"]);
     $payflow->setCustomerLastName($data["br_billing_lname"]);
     $payflow->setCustomerAddress($data["br_billing_address1"]);
     $payflow->setCustomerCity($data["br_billing_city"]);
     $payflow->setCustomerState($data["br_billing_state"]);
     $payflow->setCustomerZip($data["br_billing_zip"]);
     $payflow->setCustomerCountry($data["br_billing_country"]);
     $payflow->setCustomerPhone($data["br_billing_phone"]);
     $transaction = $payflow->processTransaction();
     $response = $payflow->getResponse();
     if ($transaction) {
         $trans = $this->create_order($data, $response);
     } elseif ($response['RESULT'] == '126' && $config['fraud_filters_actions'] == 'neworder') {
         $trans = $this->create_order($data, $response, 1);
     } else {
         $trans = array('error' => $response['RESPMSG']);
     }
     return $trans;
 }
<?php

/**
 * Single Transaction
 */
require_once 'Class.PayFlow.php';
// Single Transaction
$PayFlow = new PayFlow('VENDOR', 'PARTNER', 'USER', 'PASSWORD', 'single');
$PayFlow->setEnvironment('test');
// test or live
$PayFlow->setTransactionType('S');
// S = Sale transaction, R = Recurring, C = Credit, A = Authorization, D = Delayed Capture, V = Void, F = Voice Authorization, I = Inquiry, N = Duplicate transaction
$PayFlow->setPaymentMethod('C');
// A = Automated clearinghouse, C = Credit card, D = Pinless debit, K = Telecheck, P = PayPal.
$PayFlow->setPaymentCurrency('USD');
// 'USD', 'EUR', 'GBP', 'CAD', 'JPY', 'AUD'.
$PayFlow->setAmount('15.00', FALSE);
$PayFlow->setCCNumber('378282246310005');
$PayFlow->setCVV('4685');
$PayFlow->setExpiration('1112');
$PayFlow->setCreditCardName('Richard Castera');
$PayFlow->setCustomerFirstName('Richard');
$PayFlow->setCustomerLastName('Castera');
$PayFlow->setCustomerAddress('589 8th Ave Suite 10');
$PayFlow->setCustomerCity('New York');
$PayFlow->setCustomerState('NY');
$PayFlow->setCustomerZip('10018');
$PayFlow->setCustomerCountry('US');
$PayFlow->setCustomerPhone('212-123-1234');
$PayFlow->setCustomerEmail('*****@*****.**');
$PayFlow->setPaymentComment('New Regular Transaction');
<?php

/**
 * Recurring Transaction
 */
require_once 'Class.PayFlow.php';
// Recurring Transaction
$PayFlow = new PayFlow('VENDOR', 'PARTNER', 'USER', 'PASSWORD', 'recurring');
$PayFlow->setEnvironment('test');
// test or live
$PayFlow->setTransactionType('R');
// S = Sale transaction, R = Recurring, C = Credit, A = Authorization, D = Delayed Capture, V = Void, F = Voice Authorization, I = Inquiry, N = Duplicate transaction
$PayFlow->setPaymentMethod('C');
// A = Automated clearinghouse, C = Credit card, D = Pinless debit, K = Telecheck, P = PayPal.
$PayFlow->setPaymentCurrency('USD');
// 'USD', 'EUR', 'GBP', 'CAD', 'JPY', 'AUD'.
// Only used for recurring transactions
$PayFlow->setProfileAction('A');
$PayFlow->setProfileName('Richard_Castera');
$PayFlow->setProfileStartDate(date('mdY', strtotime("+1 day")));
$PayFlow->setProfilePayPeriod('MONT');
$PayFlow->setProfileTerm(0);
$PayFlow->setAmount('15.00', FALSE);
$PayFlow->setCCNumber('378282246310005');
$PayFlow->setCVV('4685');
$PayFlow->setExpiration('1112');
$PayFlow->setCreditCardName('Richard Castera');
$PayFlow->setCustomerFirstName('Richard');
$PayFlow->setCustomerLastName('Castera');
$PayFlow->setCustomerAddress('589 8th Ave Suite 10');
$PayFlow->setCustomerCity('New York');