<?php
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    include('PaymentProcessor.php');


    function dumpVar($response, $exit = 1)
    {
        echo '<pre>';
        print_r($response);

        echo '</pre>';

        if($exit) exit;
        else return 0;
    }

	#----------------------------------------------------------------#
    #==PayFlow Test              ====================================#
    #----------------------------------------------------------------#

    $processor = new PaymentProcessor(PAYFLOW_PRO);
    //$processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('TNQR4T7YFX');
    
    $processor->setAPIKey('PayPalUK');
    
    $processor->setAPISignature('VJWER7AUYBSU7BLH');
    
    $processor->setCardNumber('4890350000586747');
    $processor->setNameOnCard('MD ARIFUR RAHMAN');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2018');
    $processor->setAmount('1.00');
    $processor->setCVV('780');
    $processor->setFirstName('ARIFUR');
    $processor->setLastName('RAHMAN');
	$processor->setBillingCountryCode('US');
    $processor->setBillingAddress1('878 Tower Rd.');
    $processor->setBillingCity('Mundelein');
    $processor->setBillingState('IL');
    $processor->setBillingZip('60060');
    $response = $processor->sale();
    $processor->printDebugText();

	die();
    $processor = new PaymentProcessor(BEANSTREAM_MOBILE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('MadMax');
    $processor->setAPIKey('1YrInthaTropix');
    $processor->setMagData('asdasdas');
    $processor->setAPISignature('MadMax');
    $processor->setCardNumber('4477076897408775');
    $processor->setNameOnCard('Masud');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('11');
    $processor->setExpiryYear('2018');
   // $processor->setCVV(598);
    $processor->setAmount('1.00');
    $response = $processor->sale();

    $processor->printDebugText();
    dumpVar($response);


	/*Paypal 2013 update:
	merchant:  a_r_zerin@yahoo.com / !SkyLine
	buyer: zerin@pwcart.com / bdpwc2013
	*/

    #----------------------------------------------------------------#
    #==Authorize.Net Test============================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(AUTHORIZE_DOT_NET);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('2ZzE2y7s');
    $processor->setAPIKey('2Kw9b4Sg93pZ72s2');
    $processor->setCardNumber('4111111111111111');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('10');
    $processor->setAmount('10.00');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(AUTHORIZE_DOT_NET);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('2ZzE2y7s');
    $processor->setAPIKey('2Kw9b4Sg93pZ72s2');

    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('134 Lalbag Road');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('134 Lalbag Road');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('10005');
    $processor->setInvoiceNumber('ORD-2016');

    $response = $processor->authorize();
    $transId = $response->transactionId;
    $processor->printDebugText();
    echo '<pre>';
    print_r($response);
    echo '</pre><p>&nbsp;</p>';
*/
/*
    $transId = '2155164206';
    if($transId)
    {
        $processor = new PaymentProcessor(AUTHORIZE_DOT_NET);
        $processor->enableTestMode();
        $processor->enableDebugging();
        $processor->setAPIUserName('2ZzE2y7s');
        $processor->setAPIKey('2Kw9b4Sg93pZ72s2');
        $processor->setTransactionId($transId);
        $response = $processor->capture();
        $processor->printDebugText();
        echo '<pre>';
        print_r($response);
        echo '</pre>';
    }
*/

    #----------------------------------------------------------------#
    #==PayPal Website Payment Pro Test===============================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('ishrat_1192946852_biz_api1.uignet.net');
    //$processor->setAPIUserName('msh134_1265016211_biz_api1.gmail.com');
    $processor->setAPIKey('1192946862');
    //$processor->setAPIKey('1265016216');
    $processor->setAPISignature('A4Jv-1UZ9IEYyeETlyCBQ2KBOqvmAnCTfS1REj31eNpgHLkgru4T88DS');
   // $processor->setAPISignature('AQt-zVU6XzK44WMUFqupPu1S8aZyAptKQCimQ6sNIwMXsZIMrMCtVrT1');
    $processor->setCardNumber('4683075410516684');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2013');
	$processor->setCVV(598);
    $processor->setAmount('1.00');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->sale();
    $processor->printDebugText();
    */

/*
    $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('ishrat_1192946852_biz_api1.uignet.net');
    $processor->setAPIKey('1192946862');
    $processor->setAPISignature('A4Jv-1UZ9IEYyeETlyCBQ2KBOqvmAnCTfS1REj31eNpgHLkgru4T88DS');
    $processor->setAmount('10.00');
    $processor->setTransactionId('15307216BW705153B');
    $response = $processor->refund();
    $processor->printDebugText();
*/

/*     $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
    $processor->enableTestMode();
    $processor->enableDebugging();

   $processor->setAPIUserName('msh134134_api1.gmail.com');
    $processor->setAPIKey('XVR3FABE8L8CNW3J');
    $processor->setAPISignature('AdJ9fFiBZS0u2H823FRRdZWrcBQSAZ4opV.pIz6.Ed3vaXI1aTIUIyVd');
*/
/*
$processor->setAPIUserName('admin_api1.lifesavingpendant.com');
    $processor->setAPIKey('1364500377');
    $processor->setAPISignature('Ar7kDGnZsNzdocKTcGadSkTqVS5WAMJGFptMbHuv1ntC8wlBT20NaWFC');

    $processor->setCardNumber('4236078542999499');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2013');
    $processor->setCVV(598);
    $processor->setAmount('10.00');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->authorize();
    $processor->printDebugText();
    echo '<pre>'; print_r($response);
	*/

/*
    $transId = '85789873892060638';
    if($transId)
    {
        $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
        $processor->enableTestMode();
        $processor->enableDebugging();
        $processor->setAPIUserName('msh134134_api1.gmail.com');
        $processor->setAPIKey('XVR3FABE8L8CNW3J');
        $processor->setAPISignature('AdJ9fFiBZS0u2H823FRRdZWrcBQSAZ4opV.pIz6.Ed3vaXI1aTIUIyVd');

        $processor->setTransactionId($transId);
        $processor->setAmount('10.00');
        $response = $processor->capture();
        $processor->printDebugText();
        echo '<pre>';
        print_r($response);
        echo '</pre>';
    }
*/
    #----------------------------------------------------------------#
    #==FirstData Test            ====================================#
    #----------------------------------------------------------------#

    /* $processor = new PaymentProcessor(FIRST_DATA);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('1909163424');
    $processor->setAPIKey(dirname(__FILE__).'/keys/1909163424.pem');
   // $processor->setTransactionId('123456');


    $processor->setCardNumber('4111111111111111');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2015');


    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->sale();
    $processor->printDebugText();
     */

    #----------------------------------------------------------------#
    #==PayFlow Test              ====================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(PAYFLOW_PRO);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('msh134');
    //$processor->setAPIUserName('EduchiroPro');
    $processor->setAPIKey('PayPal');
    //$processor->setAPIKey('VSA');
    $processor->setAPISignature('Ec3dipk4');
    //$processor->setAPISignature('EduchiroPro22');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2010');
    $processor->setAmount('200.00');
    //$processor->setCVV('598');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAYFLOW_PRO);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('msh134');
    //$processor->setAPIUserName('EduchiroPro');
    $processor->setAPIKey('PayPal');
    //$processor->setAPIKey('VSA');
    $processor->setAPISignature('Ec3dipk4');
    //$processor->setAPISignature('EduchiroPro22');
    $processor->setCardNumber('4683075410516684');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2010');
    $processor->setAmount('200.00');
    $processor->setTransactionId('V18A2BBB68BA');
    $response = $processor->refund();
    $processor->printDebugText();
*/
    #----------------------------------------------------------------#
    #==EWay Test                 ====================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(EWAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('87654321');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4444333322221111');
    $processor->setExpiryMonth('08');
    $processor->setExpiryYear('2012');
    $processor->setAmount(1000);
	$processor->setCVV('123');

    $processor->setInvoiceNumber('ABC123456');
    $response = $processor->sale();
    $processor->printDebugText();
	dumpVar($response);
	*/

/*
    $processor = new PaymentProcessor(EWAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('11223344');
    $processor->setAPIKey('pwabc123');
    $processor->setExpiryMonth('08');
    $processor->setExpiryYear('2010');
    $processor->setAmount(10);
    $processor->setTransactionId('09876543210');
    $response = $processor->refund();
    $processor->printDebugText();
*/
    #----------------------------------------------------------------#
    #==Transfirst Test====================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(TRANS_FIRST);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('33649');
    $processor->setAPIKey('5W9Q7Z68NBQNAP4L');
    $processor->setCardNumber('4012888888881881');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('11');
    $processor->setExpiryYear('11');
    $processor->setAmount(0.01);
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(TRANS_FIRST);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('33649');
    $processor->setAPIKey('5W9Q7Z68NBQNAP4L');
    $processor->setExpiryMonth('11');
    $processor->setExpiryYear('11');
    $processor->setAmount(0.01);
    $processor->setTransactionId('200983009');
    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #==Creating Recurring Profile====================================#
    #----------------------------------------------------------------#

    /*
    $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
    //$processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('ishrat_1192946852_biz_api1.uignet.net');
    $processor->setAPIKey('1192946862');
    $processor->setAPISignature('A4Jv-1UZ9IEYyeETlyCBQ2KBOqvmAnCTfS1REj31eNpgHLkgru4T88DS');

    $processor->setCardNumber('5473156000343498');
    $processor->setNameOnCard('GARY J JEZORSKI');
    $processor->setCardType(CT_MASTER_CARD);
    $processor->setExpiryMonth('11');
    $processor->setExpiryYear('2011');
    $processor->setCVV(484);

    $processor->setNote('A recurring product');
    $processor->setAmount('0.01');
    $processor->setFirstName('GARY j');
    $processor->setLastName('JEZORSKI');
    $processor->setBillingAddress1('1561 N. Cypress Pointe Drive');
    $processor->setBillingCity('Vernon Hills');
    $processor->setBillingState('IL');
    $processor->setBillingZip('60061');

    $processor->setBillingPeriod('Day');
    $processor->setRecurringStartDate('2010-03-28T09:30:00Z');
    $processor->setBillingFrequency(30);
    $processor->setTotalBillingCycles(1);

    $response = $processor->createRecurringProfile();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #==Getting Recurring Profile====================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
//    $processor->enableTestMode();
    $processor->enableDebugging();
    //$processor->setAPIUserName('msh134134_api1.gmail.com');
    //$processor->setAPIKey('XVR3FABE8L8CNW3J');
    //$processor->setAPISignature('AdJ9fFiBZS0u2H823FRRdZWrcBQSAZ4opV.pIz6.Ed3vaXI1aTIUIyVd');
    //$processor->setRecurringProfileId('I-EV3N9609Y1SM');
	$processor->setAPIUserName('leanneely_api1.aol.com');
    $processor->setAPIKey('W5CH92GCHH357EEL');
    $processor->setAPISignature('AQU0e5vuZCvSg-XJploSa.sGUDlpA.CQJ1k2O8Qgd2E2Rng9zuRK-1dL');
	$processor->setRecurringProfileId('I-4VLYD1T82P2Y');
    $response = $processor->getRecurringProfileDetails();
    $processor->printDebugText();
*/
    #----------------------------------------------------------------#
    #================================================================#
    #----------------------------------------------------------------#
    //echo '<pre>-----------------------------------------------------';
    //print_r($response);
    //echo '</pre>----------------------------------------------------';

    #----------------------------------------------------------------#
    #==PayPal Standard Test      ====================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(PAYPAL_STANDARD);
    $processor->enableTestMode();

    $processor->setAPIUserName('a_r_zerin@yahoo.com');
    $processor->setReturnURL('http://www2.secureinfossl.com/pl/result.php?action=success');
    $processor->setCancelURL('http://www2.secureinfossl.com/pl/result.php?action=cancel');
    $processor->setNotifyURL('http://www2.secureinfossl.com/pl/result.php?action=ipn');

    $processor->setCurrencyCode('USD');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setEmail('msh134@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingAddress2('Fake Zone');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('BD');
    $processor->setPhone('8888888888');

    $item = new Item();
    $item->setItemName('An order from SPWC');
    $item->setItemPrice(10.00);
    $item->setItemQuantity(2);
    $processor->setItem($item);

    $item = new Item();
    $item->setItemName('Another order from SPWC');
    $item->setItemPrice(15.00);
    $item->setItemQuantity(2);
    $processor->setItem($item);

    $response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);

*/

/*
    $item = new Item();
    $item->setItemName('Two order from SPWC');
    $item->setItemPrice(10.00);
    $item->setItemQuantity(2);
    $item->setRecurringPrice(25.00);
    $item->setRecurringStartDuration(30);
    $item->setRecurringCount(5);
    $item->setRecurringCycle(30);
    $processor->setItem($item);
*/

   // echo '<html><body>' . $processor->sale() . '</body></html>';

  //  print_r(parse_url('https://www.paypal.com/cgi-bin/webscr'));

    #----------------------------------------------#
    # Sage Pay Tests                               #
    #----------------------------------------------#
/*
    $processor = new PaymentProcessor(SAGEPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('msh134');
    $processor->setCardNumber('4929000000006');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('200.00');
    $processor->setCVV('123');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('88');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('412');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('88');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('412');

    $processor->setInvoiceNumber('ORD-2013');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(SAGEPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('msh134');
    $processor->setCardNumber('4683075410516684');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2010');
    $processor->setAmount('100.00');
    $processor->setTransactionId('{AA985366-FDC8-44EE-BE4D-FD5361A29B47}');
    $processor->setAuthorizationId('4081');
    $processor->setSecurityCode('77B0P6AT9O');
    $processor->setInvoiceNumber('ORD-2013');
    $processor->setNote('Refund');

    $response = $processor->refund();
    $processor->printDebugText();
    echo '<pre>';

    print_r($response);
*/
/*
    $processor = new PaymentProcessor(SAGEPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('msh134');
    $processor->setAmount('100.00');
    $processor->setCurrencyCode('USD');
    $processor->setTransactionId('{881B21B2-394C-4EBA-9295-1137D8D2D96D}');
    $processor->setAuthorizationId('5495');
    $processor->setSecurityCode('9DJPPZ7KTM');
    $processor->setRelatedInvoiceNumber('ORD-2013');
    $processor->setInvoiceNumber('ORD-2013-2');
    $processor->setTransactionAsRecurring();
    $processor->setNote('repeat');

    $response = $processor->sale();
    $processor->printDebugText();
*/
	#----------------------------------------------------------------#
    #==AlertPay Test=================================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(ALERTPAY);
    $processor->enableTestMode();

    $processor->setAPIUserName('msh134@gmail.com');
    $processor->setReturnURL('http://www2.secureinfossl.com/pl/result.php?action=success');
    $processor->setCancelURL('http://www2.secureinfossl.com/pl/result.php?action=cancel');
    //$processor->setNotifyURL('http://www2.secureinfossl.com/pl/result.php?action=ipn');

    $processor->setCurrencyCode('USD');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setEmail('msh134@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingAddress2('Fake Zone');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('BD');
    $processor->setPhone('8888888888');

    /*$item = new Item();
    $item->setItemName('An order from SPWC');
    $item->setItemPrice(10.00);
    $item->setItemQuantity(2);
    $processor->setItem($item);

    $item = new Item();
    $item->setItemName('Another order from SPWC');
    $item->setItemPrice(15.00);
    $item->setItemQuantity(2);
    $processor->setItem($item);*/

    /*$item = new Item();
    $item->setItemName('Two order from SPWC');
    $item->setItemPrice(10.00);
    $item->setItemQuantity(2);
    $item->setRecurringPrice(25.00);
    $item->setRecurringStartDuration(30);
    $item->setRecurringCount(5);
    $item->setRecurringCycle(30);
    $processor->setItem($item);


    echo '<html><body>' . $processor->sale() . '</body></html>';*/

    #----------------------------------------------------------------#
    #==RBS WorldPay Test=============================================#
    #----------------------------------------------------------------#
/*

    $processor = new PaymentProcessor(RBSWORLDPAY);
    $processor->enableTestMode();

     //$processor->setAPIUserName('211621');
    //$processor->setReturnURL('http://www2.secureinfossl.com/pl/result.php?action=success');
    //$processor->setCancelURL('http://www2.secureinfossl.com/pl/result.php?action=cancel');
    //$processor->setNotifyURL('http://www2.secureinfossl.com/pl/result.php?action=ipn');


    // test card number:  4911830000000

	$processor->setAPIUserName('275905');
    $processor->setReturnURL('http://google.com');
    $processor->setCancelURL('http://google.com');
    $processor->setNotifyURL('http://google.com');

    $processor->setCurrencyCode('USD');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setEmail('msh134@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingAddress2('Fake Zone');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('BD');
    $processor->setPhone('8888888888');

    $processor->setInvoiceNumber('ORD-123456');

    $item = new Item();
    $item->setItemName('An order from SPWC');
    $item->setItemPrice(1.00);
    $item->setItemQuantity(1);
    $processor->setItem($item);*/

    /*$item = new Item();
    $item->setItemName('Another order from SPWC');
    $item->setItemPrice(15.00);
    $item->setItemQuantity(2);
    $processor->setItem($item);*/

 /*  $item = new Item();
    $item->setItemName('Two order from SPWC');
    $item->setItemPrice(1.00);
    $item->setItemQuantity(2);
    $item->setRecurringPrice(25.00);
    $item->setRecurringStartDuration(30);
    $item->setRecurringCount(5);
    $item->setRecurringCycle(30);
    $processor->setItem($item);*/


    //echo '<html><body>' . $processor->sale() . '</body></html>';
	/*$response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);*/

    #----------------------------------------------------------------#
    #== QuickBooks Merchant Services Test ===========================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(QUICKBOOKS_MERCHANT_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('premiumwebcart.www2.secureinfossl.com');
    $processor->setAPISignature('TGT-152-pzxaDDTvdKaWKC5M0kC$Sw');

    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('134 Lalbag Road');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('134 Lalbag Road');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('10005');

    $processor->setInvoiceNumber('ORD-2014');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(QUICKBOOKS_MERCHANT_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('premiumwebcart.www2.secureinfossl.com');
    $processor->setAPISignature('TGT-152-pzxaDDTvdKaWKC5M0kC$Sw');
    $processor->setAmount('10.00');
    $processor->setTransactionId('ZZ2527218252');
    //$processor->setInvoiceNumber('ORD-20141');
    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== USAePay Test ===========================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(USAEPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIKey('Ji01UJVo97pxe3MPukai7u04QNLXrZU7');

    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('134 Lalbag Road');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('134 Lalbag Road');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('10005');

    $processor->setInvoiceNumber('ORD-2014');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(USAEPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIKey('Ji01UJVo97pxe3MPukai7u04QNLXrZU7');
    $processor->setAmount('10.00');
    $processor->setTransactionId('47060358');
    $processor->setInvoiceNumber('ORD-2014');
    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== MerchantOne Test ===========================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(MERCHANTONE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('demo');
    $processor->setAPIKey('password');

    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('134 Lalbag Road');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('134 Lalbag Road');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('10005');

    $processor->setInvoiceNumber('ORD-2014');
    $response = $processor->sale();
    $processor->printDebugText();
*/

/*
    $processor = new PaymentProcessor(MERCHANTONE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('demo');
    $processor->setAPIKey('password');
    $processor->setAmount('10.00');
    $processor->setTransactionId('1290533471');
    $processor->setInvoiceNumber('ORD-2014');
    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Fast Charge Test ===========================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(FASTCHARGE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('TEST0');

    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('134 Lalbag Road');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('134 Lalbag Road');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('10005');

    $processor->setInvoiceNumber('ORD-2016');
    $response = $processor->sale();
    $transId = $response->transactionId;
    $processor->printDebugText();
*/


/*
    $processor = new PaymentProcessor(FASTCHARGE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('TEST0');

    $processor->setAmount('10.00');
    $processor->setSecurityCode('16532535700');
    $processor->setInvoiceNumber('124647505');
    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== InternetSecure Test============================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(INTERNET_SECURE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('NNNNN');
    $processor->setCardNumber('4111111111111111');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('10');
    $processor->setAmount('10.00');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(AUTHORIZE_DOT_NET);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('2ZzE2y7s');
    $processor->setAPIKey('2Kw9b4Sg93pZ72s2');

    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2011');
    $processor->setAmount('10.00');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('134 Lalbag Road');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');
    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('134 Lalbag Road');
    $processor->setShippingCity('Dhaka');
    $processor->setShippingState('NY');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('10005');
    $processor->setInvoiceNumber('ORD-2016');

    $response = $processor->authorize();
    $transId = $response->transactionId;
    $processor->printDebugText();
*/
/*
    $transId = '2155164206';
    $processor = new PaymentProcessor(AUTHORIZE_DOT_NET);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('2ZzE2y7s');
    $processor->setAPIKey('2Kw9b4Sg93pZ72s2');
    $processor->setTransactionId($transId);
    $response = $processor->capture();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Virtual Card Services Test===================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(VIRTUAL_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('9318');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4242424242424242');
    $processor->setExpiryMonth('08');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC1234568');
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(VIRTUAL_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('9318');
    $processor->setAmount(10);
    $processor->setInvoiceNumber('ABC123456');
    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(VIRTUAL_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('9318');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4242424242424242');
    $processor->setExpiryMonth('08');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC1234577');

    $response = $processor->authorize();
    $transId = $response->transactionId;
    $processor->printDebugText();
*/
/*
    $invoiceNumber = 'ABC1234577';

    $processor = new PaymentProcessor(VIRTUAL_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('9318');
    $processor->setInvoiceNumber($invoiceNumber);
    $response = $processor->capture();
    $processor->printDebugText();
*/
    #----------------------------------------------------------------#
    #== Caledoncard Merchant Services Test===========================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(CALEDON_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('IDCOTEST');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(CALEDON_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('IDCOTEST');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(CALEDON_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('IDCOTEST');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);
    $processor->setTransactionId('T92034');
    $processor->setInvoiceNumber('ABC1294382134');
    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $transId = 'T92034';

    $processor = new PaymentProcessor(CALEDON_CARD_SERVICES);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('IDCOTEST');
    $processor->setAmount(10.00);
    $processor->setInvoiceNumber('ABC1294382134');
    $processor->setTransactionId($transId);
    $response = $processor->capture();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Virtual Merchant Services Test ==============================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(VIRTUAL_MERCHANT);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('567524');
    $processor->setAPIKey('08WHRD');
    $processor->setAPISignature('567524');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2011');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(VIRTUAL_MERCHANT);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('567524');
    $processor->setAPIKey('08WHRD');
    $processor->setAPISignature('567524');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(VIRTUAL_MERCHANT);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('567524');
    $processor->setAPIKey('08WHRD');
    $processor->setAPISignature('567524');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);

    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(VIRTUAL_MERCHANT);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('567524');
    $processor->setAPIKey('08WHRD');
    $processor->setAPISignature('567524');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);

    $processor->setAuthorizationId('123456');
    $response = $processor->capture();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== PSiGate Merchant Services Test ==============================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(PSIGATE);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('teststore');
    $processor->setAPIKey('psigate1234');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PSIGATE);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('teststore');
    $processor->setAPIKey('psigate1234');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('2013');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PSIGATE);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('teststore');
    $processor->setAPIKey('psigate1234');

    $processor->setTransactionId('2011021002383900859');
    $processor->setAmount(10.00);

    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PSIGATE);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('teststore');
    $processor->setAPIKey('psigate1234');

    $processor->setAmount(10.00);
    $processor->setTransactionId('2011021002471600872');

    $response = $processor->capture();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Moneris eSelect Plus Test      ==============================#
    #----------------------------------------------------------------#

    /*$processor = new PaymentProcessor(MONERIS_ESELECT_PLUS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('monusqa006');
    $processor->setAPIKey('qatoken');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4242424242424242');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(1.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();*/

/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('monusqa006');
    $processor->setAPIKey('qatoken');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('John Smith');
    $processor->setCardNumber('4242424242424242');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(1.00);

    $processor->setInvoiceNumber('ABC-' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('monusqa006');
    $processor->setAPIKey('qatoken');

    $processor->setTransactionId('3987-1_10');
    $processor->setAmount(1.00);
    $processor->setInvoiceNumber('ABC-1297751912');

    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('monusqa006');
    $processor->setAPIKey('qatoken');

    $processor->setAmount(1.00);
    $processor->setTransactionId('3986-0_10');
    $processor->setInvoiceNumber('ABC-1297751912');

    $response = $processor->capture();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Moneris eSelect Plus Canada Test      =======================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS_CANADA);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('store1');
    $processor->setAPIKey('yesguy');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('878 Tower Rd.');
    $processor->setBillingCity('Mundulein');
    $processor->setBillingState('IL');
    $processor->setBillingZip('60060');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4242424242424242');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(1.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS_CANADA);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('store1');
    $processor->setAPIKey('yesguy');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('878 Tower Rd.');
    $processor->setBillingCity('Mundulein');
    $processor->setBillingState('IL');
    $processor->setBillingZip('60060');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4242424242424242');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(1.00);

    $processor->setInvoiceNumber('ABC-' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS_CANADA);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('store1');
    $processor->setAPIKey('yesguy');

    $processor->setTransactionId('313353-0_7');
    $processor->setAmount(1.00);
    $processor->setInvoiceNumber('ABC1318918586');

    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(MONERIS_ESELECT_PLUS_CANADA);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('store1');
    $processor->setAPIKey('yesguy');

    $processor->setAmount(1.00);
    $processor->setTransactionId('313350-0_7');
    $processor->setInvoiceNumber('ABC-1318918338');

    $response = $processor->capture();
    $processor->printDebugText();
*/
    #----------------------------------------------------------------#
    #== Network Merchants Test      =================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(NETWORK_MERCHANTS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('demo');
    $processor->setAPIKey('password');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();

*/
/*
    $processor = new PaymentProcessor(NETWORK_MERCHANTS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('demo');
    $processor->setAPIKey('password');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC-' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(NETWORK_MERCHANTS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('demo');
    $processor->setAPIKey('password');
    $processor->setAmount(10.00);
    $processor->setTransactionId('1384090340');

    $response = $processor->capture();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(NETWORK_MERCHANTS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('demo');
    $processor->setAPIKey('password');
    $processor->setTransactionId('1384090340');
    $processor->setAmount(10.00);

    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== E-xact Transactions Test    =================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(EXACT_TRANSACTIONS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AD1780-01');
    $processor->setAPIKey('ec3dipk4');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(EXACT_TRANSACTIONS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AD1780-01');
    $processor->setAPIKey('ec3dipk4');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC-' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(EXACT_TRANSACTIONS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AD1780-01');
    $processor->setAPIKey('ec3dipk4');

    $processor->setAuthorizationId('ET185322');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $response = $processor->capture();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(EXACT_TRANSACTIONS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AD1780-01');
    $processor->setAPIKey('ec3dipk4');
    $processor->setAuthorizationId('ET163562');
    $processor->setAmount(10.00);

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');

    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Payment Express Test        =================================#
    #----------------------------------------------------------------#

/*
    $processor = new PaymentProcessor(PAYMENT_EXPRESS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AthenaSoftwareDev');
    $processor->setAPIKey('test1234');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('5431111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);
    $processor->setCurrencyCode('USD');

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAYMENT_EXPRESS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AthenaSoftwareDev');
    $processor->setAPIKey('test1234');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('5431111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC-' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAYMENT_EXPRESS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AthenaSoftwareDev');
    $processor->setAPIKey('test1234');

    $processor->setSecurityCode('00000008015e8e4f');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('5431111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $response = $processor->capture();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAYMENT_EXPRESS);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('AthenaSoftwareDev');
    $processor->setAPIKey('test1234');

    $processor->setSecurityCode('00000008015e911f');
    $processor->setAmount(10.00);

    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== PayJunction Test            =================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(PAY_JUNCTION);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('pj-ql-01');
    $processor->setAPIKey('pj-ql-01p');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4433221111223344');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(2.00);
    $processor->setCurrencyCode('USD');

    $processor->setInvoiceNumber('ABC' . time());
    $response = $processor->sale();
    $processor->printDebugText();

/*
    $processor = new PaymentProcessor(PAY_JUNCTION);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('pj-ql-01');
    $processor->setAPIKey('pj-ql-01p');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $processor->setBillingCountryCode('US');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $processor->setInvoiceNumber('ABC-' . time());
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAY_JUNCTION);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('pj-ql-01');
    $processor->setAPIKey('pj-ql-01p');

    $processor->setAuthorizationId('ET185322');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');
    $processor->setAmount(10.00);

    $response = $processor->capture();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAY_JUNCTION);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('pj-ql-01');
    $processor->setAPIKey('pj-ql-01p');

    $processor->setAuthorizationId('ET163562');
    $processor->setAmount(10.00);

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('03');
    $processor->setExpiryYear('2012');

    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== PaySimple Test            =================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(PAY_SIMPLE);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('APIUser2274');
    $processor->setAPIKey('wkIjR0StqFJRJo132sfOuC3r1JwjBgSvSM125fCmeyEoa73rkX51rp4YVa7VHesS8iaASZy0DRGyormVroUVh6EZQN37mXpPpNcgGbKeatodLojLc081bs73Xb3pMnp0');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('878 Tower Rd.');
    $processor->setBillingCity('Mundelein');
    $processor->setBillingState('IL');
    $processor->setBillingZip('60060');
    $processor->setBillingCountryCode('USA');

    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardNumber('4111111111111111');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('2011');
    $processor->setAmount(1.00);
    $processor->setCurrencyCode('USD');
    $processor->setCardType(CT_VISA);

    $processor->setShippingFirstName('Sajjad');
    $processor->setShippingLastName('Hossain');
    $processor->setShippingAddress1('878 Tower Rd.');
    $processor->setShippingCity('Mundelein');
    $processor->setShippingState('IL');
    $processor->setShippingCountryCode('US');
    $processor->setShippingZip('60060');

    $processor->setInvoiceNumber('MSH-' . time());
    $response = $processor->sale();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(PAY_SIMPLE);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('APIUser2274');
    $processor->setAPIKey('wkIjR0StqFJRJo132sfOuC3r1JwjBgSvSM125fCmeyEoa73rkX51rp4YVa7VHesS8iaASZy0DRGyormVroUVh6EZQN37mXpPpNcgGbKeatodLojLc081bs73Xb3pMnp0');

    $processor->setTransactionId('167488');

    $response = $processor->refund();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== Quantum Test            =================================#
    #----------------------------------------------------------------#
/*
    $processor = new PaymentProcessor(QUANTUM_GATEWAY);
    $processor->enableTestMode();
    $processor->enableDebugging();

    $processor->setAPIUserName('PWCart');
    $processor->setAPIKey('eYX12ccUHbSE5GA');

    $processor->setCardNumber('4683075410516684');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2012');
    $processor->setAmount('0.10');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setEmail('enggmasud1983@gmail.com');

    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');

    $response = $processor->sale();
    $processor->printDebugText();
	*/

/*
    $processor = new PaymentProcessor(QUANTUM_GATEWAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('PWCart');
    $processor->setAPIKey('eYX12ccUHbSE5GA');
    $processor->setCardNumber(6684);
    $processor->setTransactionId(7542394);
    $processor->setAmount('0.10');
    $response = $processor->refund();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(QUANTUM_GATEWAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('PWCart');
    $processor->setAPIKey('eYX12ccUHbSE5GA');
    $processor->setCardNumber('4683075410516684');
    $processor->setNameOnCard('Sajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2012');
    $processor->setAmount('0.10');
    $response = $processor->authorize();
    $processor->printDebugText();
*/
/*
    $processor = new PaymentProcessor(QUANTUM_GATEWAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('PWCart');
    $processor->setAPIKey('eYX12ccUHbSE5GA');
    $processor->setTransactionId(7542558);
    $processor->setAmount('0.10');
    $response = $processor->capture();
    $processor->printDebugText();
*/

    #----------------------------------------------------------------#
    #== PayPoint Test            ====================================#
    #----------------------------------------------------------------#
   /* $processor = new PaymentProcessor(PAYPOINT);
    //$processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('256631');
    $processor->setCardNumber('4539105011539664');
    $processor->setNameOnCard('Joe Bloggs');
    $processor->setCardType('VISA');
    $processor->setCVV('707');
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2012');
    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setEmail('enggmasud1983@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');

    $processor->setAmount('1.00');
    $processor->setCurrencyCode('GBP');

    $processor->setInvoiceNumber('654321');

    $response = $processor->sale();
    $processor->printDebugText();

    dumpVar($response);
	*/


	#----------------------------------------------------------------#
    #== Samurai Test            ====================================#
    #----------------------------------------------------------------#

    /*$processor = new PaymentProcessor(SAMURAI);
    $processor->enableTestMode();
    $processor->enableDebugging();

	$processor->setCardType('VISA');
	$processor->setCardNumber('4111111111111111');
    $processor->setCVV('123');
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('2015');
    $processor->setFirstName('John');
    $processor->setLastName('Doe');
	$processor->setBillingAddress1('1000 1st Av');
    $processor->setBillingCity('Chicago');
    $processor->setBillingState('IL');
    $processor->setBillingZip('10101');


	//merchant user name
	$processor->setAPIUserName('902375b3e1fa4df61e3ae54b');
	// merchant password
    $processor->setAPIKey('89762ea19b767892e5733e0e');
	// token
	$processor->setAPISignature('a3d9af190ae9f15c96b5b3e7');

	//$response = $processor->gettoken();
	//$token = (explode('=',$response->rawResponse));
	//$t2 = explode('"',$token[2]);
	$processor->setAmount('1.0');
    $processor->setCurrencyCode('USD');

	//$processor->setAPIUserName(trim($t2[0]));
	$response = $processor->sale();
	//$response = $processor->authorize();
*/
	//authorise & sale returns transaction_token that is used in capture and refund.
	/*
	$processor = new PaymentProcessor(SAMURAI);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setTransactionId('8c8d7e15b886091dccc2a187');
	$processor->setAmount('1.20');
	$response = $processor->capture();
	*/
	/*

	$processor = new PaymentProcessor(SAMURAI);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setTransactionId('c4917fb2516161960daf9cfe');
	$processor->setAmount('1.20');
	$response = $processor->refund();

*/
	//$processor->printDebugText();
   //  dumpVar($response);

   # payleap  ---------------------------------#
   # payleap Test ............................#

   //Payleap SALE
  /*  $processor = new PaymentProcessor(PAYLEAP);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('pwc_merchant_API');
    $processor->setAPIKey('Xx7WuwmnMd7wBhpC');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Masud-uz-zaman');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('14');
    $processor->setCVV(598);
    $processor->setAmount('7.5');
    $processor->setInvoiceNumber('ORD-2013');

    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');

    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->sale();
	$processor->printDebugText();
    dumpVar($response);


*/


    //Payleap Auth.
   /*
    $processor = new PaymentProcessor(PAYLEAP);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('premiumwebcart_API');
    $processor->setAPIKey('Cu2WB8bxPd2$Z8w5');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('Sajjad Hossain on card');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('14');
    $processor->setAmount('7.00');
    $processor->setFirstName('ff');
    $processor->setLastName('ll');
	$processor->setPhone('8888888888');
    $processor->setEmail('ee@gmail.com');

    $processor->setBillingAddress1('billing add');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->authorize();
	*/



    //Payleap capture.
/*
 $processor = new PaymentProcessor(PAYLEAP);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('premiumwebcart_API');
    $processor->setAPIKey('Cu2WB8bxPd2$Z8w5');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('xx Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('14');
    $processor->setAmount('1.00');
	$processor->setTransactionId('42563');

   $processor->setFirstName('Sajjadxx1');
    $processor->setLastName('Hossainxx1');
    $processor->setEmail('xx1@gmail.com');

  $processor->setBillingAddress1('123 Fake Street11');
    $processor->setBillingCity('New York11');
   $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->capture();
*/


    //Payleap Return.

  /*  $processor = new PaymentProcessor(PAYLEAP);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('premiumwebcart_API');
    $processor->setAPIKey('Cu2WB8bxPd2$Z8w5');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('yySajjad Hossain');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('14');
    $processor->setAmount('1.00');

    $processor->setFirstName('yySajjad');
    $processor->setLastName('yyHossain');
    $processor->setEmail('test@gmail.com');
    $processor->setTransactionId('42561');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->refund();

*/

    #----------------------------------------------------------------#
    #== SecurePay Test            ====================================#
    #----------------------------------------------------------------#

	/*

	$processor = new PaymentProcessor(SECUREPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('abc0030');
    $processor->setAPIKey('abc123');
    $processor->setCardNumber('4444333322221111');
    $processor->setNameOnCard('Masud-uz-zaman');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('14');
    //$processor->setCVV(598);
    $processor->setAmount('105.25');
    $processor->setInvoiceNumber('ORD-02746');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');


	$response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);

*/

	//refund
	/*
	$processor = new PaymentProcessor(SECUREPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('abc0030');
    $processor->setAPIKey('abc123');
    $processor->setCardNumber('4444333322221111');
    $processor->setNameOnCard('Masud-uz-zaman');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('10');
    $processor->setExpiryYear('14');
    $processor->setCVV(598);
    $processor->setAmount('2');
    $processor->setInvoiceNumber('ORD-0517');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
	$processor->setTransactionId('968729');

	$response = $processor->refund();
    $processor->printDebugText();
    dumpVar($response);
	*/

	#----------------------------------------------------------------#
    #== WorldPay Test            ====================================#
    #----------------------------------------------------------------#

	/*
	$processor = new PaymentProcessor(WORLDPAYREALTIME);

	$processor->enableTestMode();
	$processor->enableDebugging();
	$processor->setAPIUserName('275905');
	$processor->setCardNumber('4917610000000000');
	//	4911830000000

    $processor->setNameOnCard('Masud-uz-zaman');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('14');
    //$processor->setCVV(598);
    $processor->setAmount('105.25');
    $processor->setInvoiceNumber('ORD-02746');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
	$response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);
	*/
	#----------------------------------------------------------------#
    #== WONDERPAY Test            ====================================#
    #----------------------------------------------------------------#
	/*
	$processor = new PaymentProcessor(WONDERPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('TEST0');
    $processor->setCardNumber('5454545454545454');
    $processor->setNameOnCard('Masud-uz-zaman');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('01');
    $processor->setExpiryYear('14');
	//$processor->setTransactionId('168221450');
	//$processor->setAuthorizationId('232345434');

    //$processor->setCVV(598);
    $processor->setAmount('5');
    $processor->setInvoiceNumber('ORD-02746');
    $processor->setFirstName('Masud1');
    $processor->setLastName('zaman1');
    $processor->setEmail('enggmasud1983@gmail.com');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
	$response = $processor->authorize();
    $processor->printDebugText();
    dumpVar($response);
*/



#----------------------------------------------------------------#
#== cardSave Test            ====================================#
#----------------------------------------------------------------#
/*
	$processor = new PaymentProcessor(CARDSAVE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('Amtech-6156687');
	$processor->setAPIKey('HB7DR62VHJ');
	$processor->setAPISignature('3423+1CVCrI0Lf2Z7Uhuji879mdHKKB7Du27uHySDSD=P1');
    $processor->setCardNumber('4976000000003436');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('12');
    $processor->setCVV('452');
    $processor->setAmount('1000');
	$processor->setCurrencyCode('GBP');
    $processor->setInvoiceNumber('ORD-02749');
	$processor->setTransactionId('404791');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
	$processor->setPhone('13123');
    $processor->setBillingAddress1('32 Edward Street');
    $processor->setBillingCity('Camborne');
    $processor->setBillingState('Cornwall');
    $processor->setBillingZip('TR148PA');
	$response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response); */

    #----------------------------------------------------------------#
    #== Atlantic First Commerce Test            ====================================#
    #----------------------------------------------------------------#

	/*

    $processor = new PaymentProcessor(FIRSTATLANTICCOMMERCE);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('88800032');
    $processor->setAPIKey('DM80pc27');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('12');
    $processor->setCVV('452');
    $processor->setAmount('3');
    $processor->setCurrencyCode('GBP');

    $processor->setTransactionId('404791');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setPhone('13123');
    $processor->setBillingAddress1('32 Edward Street');
    $processor->setBillingCity('Camborne');
    $processor->setBillingState('Cornwall');
    $processor->setBillingZip('TR148PA');
    //$order_no = 'FACPGTEST' . msTimeStamp();
    //$order_no = '9090900808089';
    $order_no = 'ORD-44';
    $processor->setInvoiceNumber($order_no);
    $response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);*/




// OPTIMAL PAYMENTS

//Authorization
  /* $processor = new PaymentProcessor(OPTIMALPAYMENTS);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('89992140');
    $processor->setAPIKey('test');
    $processor->setAPISignature('test');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType('VI');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('13');
    $processor->setCVV('452');
    $processor->setAmount('9.00');
    $processor->setCurrencyCode('GBP');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setPhone('13123');
    $processor->setBillingAddress1('123 Main Street');
    $processor->setBillingCity('LA');
    $processor->setBillingState('CA');
    $processor->setBillingZip('90210');
    $order_no = 'ORD-44';
    $processor->setInvoiceNumber($order_no);

    $response = $processor->authorize();
    $processor->printDebugText();
    dumpVar($response);
*/
//End of Authorization.


// capture
  /*  $processor = new PaymentProcessor(OPTIMALPAYMENTS);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('89992140');
    $processor->setAPIKey('test');
    $processor->setAPISignature('test');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType('VI');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('13');
    $processor->setCVV('452');
    $processor->setAmount('1.00');
    $processor->setCurrencyCode('GBP');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setPhone('13123');
    $processor->setBillingAddress1('123 Main Street');
    $processor->setBillingCity('LA');
    $processor->setBillingState('CA');
    $processor->setBillingZip('90210');
    $order_no = 'ORD-44';
    // send confirmation.
    $processor->setTransactionId('131099129');

    $response = $processor->capture();
    $processor->printDebugText();
    dumpVar($response);

*/

//Sale

   /* $processor = new PaymentProcessor(OPTIMALPAYMENTS);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('89992140');
    $processor->setAPIKey('test');
    $processor->setAPISignature('test');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType('VI');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('13');
    $processor->setCVV('452');
    $processor->setAmount('53.00');
    $processor->setCurrencyCode('GBP');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setPhone('13123');
    $processor->setBillingAddress1('123 Main Street');
    $processor->setBillingCity('LA');
    $processor->setBillingState('CA');
    $processor->setBillingZip('90210');
    $order_no = 'ORD-44';
    $processor->setInvoiceNumber($order_no);

	$response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);
*/
//End of Sale.


// refund
/*
    $processor = new PaymentProcessor(OPTIMALPAYMENTS);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('89992140');
    $processor->setAPIKey('test');
    $processor->setAPISignature('test');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType('VI');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('13');
    $processor->setCVV('452');
    $processor->setAmount('4.00');
    $processor->setCurrencyCode('GBP');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setPhone('13123');
    $processor->setBillingAddress1('123 Main Street');
    $processor->setBillingCity('LA');
    $processor->setBillingState('CA');
    $processor->setBillingZip('90210');
    $order_no = 'ORD-44';
    // send confirmation.
    $processor->setTransactionId('131099141');

    $response = $processor->refund();
    $processor->printDebugText();
    dumpVar($response);
*/

//PlugNPay
//Sale

 /*  $processor = new PaymentProcessor(PLUGNPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
	$processor->setAPIUserName('pnpdemo2');
    $processor->setAPIKey('55pnpdemo55');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType('VI');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('2013');
    $processor->setCVV('452');
    $processor->setAmount('4.00');
    $processor->setCurrencyCode('GBP');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
   	$response = $processor->sale();
    $processor->printDebugText();
    dumpVar($response);
*/

 //Refund
   /* $processor = new PaymentProcessor(PLUGNPAY);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('pnpdemo2');
    $processor->setAPIKey('55pnpdemo55');
    $processor->setCardNumber('4111111111111111');
    $processor->setNameOnCard('John Watson');
    $processor->setCardType('VI');
    $processor->setExpiryMonth('12');
    $processor->setExpiryYear('2013');
    $processor->setCVV('452');
    $processor->setAmount('84.00');
    $processor->setCurrencyCode('GBP');
    $processor->setFirstName('Masud');
    $processor->setLastName('zaman');
    $processor->setEmail('test@gmail.com');
    $processor->setTransactionId('2013012509581824738');
    $response = $processor->refund();
    $processor->printDebugText();
    dumpVar($response);

*/



/*
    $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $processor->setAPIUserName('masud-facilitator_api1.pwcart.com');
    $processor->setAPIKey('1385460885');
    $processor->setAPISignature('AiPC9BjkCyDFQXbSkoZcgqH3hpacAcmGnghP74vXLhH-of41T8Ao8g3B');
     $processor->setCardNumber('4477076897408775');
    $processor->setNameOnCard('Masud');
    $processor->setCardType(CT_VISA);
    $processor->setExpiryMonth('11');
    $processor->setExpiryYear('2018');
   // $processor->setCVV(598);
    $processor->setAmount('1.00');

    $processor->setFirstName('Sajjad');
    $processor->setLastName('Hossain');
    $processor->setBillingAddress1('123 Fake Street');
    $processor->setBillingCity('New York');
    $processor->setBillingState('NY');
    $processor->setBillingZip('10005');
    $response = $processor->sale();
    $processor->printDebugText();
*/

    // tid:   9UE863255L805945P
    // coId:  df13e33ea2ae


  /*  $processor = new PaymentProcessor(PAYPAL_PAYMENT_PRO_RECURRING);
    $processor->enableTestMode();
    $processor->enableDebugging();
    $response = $processor->createRecurringProfile();
    $processor->printDebugText();
    */

?>