Payment_Process2
[ class tree: Payment_Process2 ] [ index: Payment_Process2 ] [ all elements ]

Source for file echeck.php

Documentation is available at echeck.php

  1. <?php
  2.  
  3. require_once 'Payment/Process2.php';
  4.  
  5. $options = array();
  6. $options['x_delim_data''TRUE';
  7.  
  8. $process = Payment_Process::factory('AuthorizeNet',$options);
  9.  
  10. $process->_debug = true;
  11. $process->login = 'username';
  12. $process->password = 'password';
  13. $process->action = Payment_Process2::ACTION_AUTHONLY;
  14. $process->amount = 9.95;
  15.  
  16. $check Payment_Process2_Type::factory('eCheck');
  17.  
  18. $check->invoiceNumber = 112345145;
  19. $check->customerId = 1461264151;
  20. $check->firstName = 'Jose';
  21. $check->lastName = 'Perez';
  22. $check->type = Payment_Process2::CK_CHECKING;
  23. $check->bankName = 'Bank of USA';
  24. $check->accountNumber = '2222222222';
  25. $check->routingCode = '2222222222';
  26.  
  27. $process->setPayment($check);
  28.  
  29. $result $process->process();
  30.  
  31. print_r($result);
  32. echo "\n";
  33. echo "---------------------- RESPONSE ------------------------\n";
  34. echo $result->getMessage()."\n";
  35. echo $result->getCode()."\n";
  36. $result->validate();
  37.  
  38. echo "---------------------- RESPONSE ------------------------\n";

Documentation generated on Mon, 11 Mar 2019 15:40:37 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.