sfPayflowProPlugin - 1.1.1

Symfony Pay Flow Pro Support

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

Tools useful when making payflow pro credit card transactions Note: Future releases of this class will also support paypal payments

@author Jeremy Ballard @version 1.0.0 @email

This plugin was adapted from the sfPaypalLitePlugin by Ian Ricketson @email (_Slick_Rick on IRC)

Example Usage

try{

  // Initialize the class in TEST mode
  $q = new paymentTools(true);

  // Initialize the class in LIVE mode
  //$q = new paymentTools(false);

  $q->setPayflowUser('User');
  $q->setPayflowVendor('Vendor');
  $q->setPayflowPartner('Partner');
  $q->setPayflowPassword('Password');
  $q->setPayflowTender('C');
  $q->setPayflowTransactionType('S');
  $q->setPayflowCardNumber('4111111111111111');
  $q->setPayflowCardCVV2('123');     
  $q->setPayflowCardExpiration('0311');
  $q->setPayflowCardType('Visa');
  $q->setPayflowTransactionAmount('420.00');
  $q->setPayflowCurrency('USD');
  $q->setPayflowName('Jeremy Ballard');
  $q->setPayflowStreet('420 W. Side Way');
  $q->setPayflowCity('Compton');
  $q->setPayflowState('CA');
  $q->setPayflowCountry('US');      
  $q->setPayflowZip('90220');
  $q->setPayflowCustomerIp('192.168.1.1');
  $q->setPayflowComment1('Custom comment #1');
  $q->setPayflowComment2('Custom comment #2');
  $q->setPayflowVerbosity('MEDIUM');

  // Process the credit card and set any errors
  if (!$q->execute())
  {

    if ($q->hasErrors())
    {

      foreach ($q->getErrors() as $key => $error)
      {

        $this->getRequest()->setError('payflow_error_' . $key, $error);
        echo $error;
      }

    throw new Exception($error);  
    }

 }

} catch (Exception $e) {

//if error       
$this->redirect('checkout/action');             

}