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

Source for file linkpoint.php

Documentation is available at linkpoint.php

  1. <?php
  2.  
  3. require_once 'Payment/Process2.php';
  4.  
  5. $options = array();
  6.  
  7. // If you have a test store on the staging server uncomment these
  8. // $options['host'] = 'staging.linkpt.net';
  9. // $options['port'] = '1129';
  10.  
  11. // Path to your keyfile (the pem file given to you by linkpiont)
  12. $options['keyfile''/path/to/your/keyfile.pem';
  13.  
  14. $process = Payment_Process::factory('LinkPoint',$options);
  15.  
  16. $process->_debug = true;
  17. $process->login = 'xxxxxxxxxx'// Your linkpoint store ID
  18. $process->password = '12345678'// Your store's password
  19. $process->action = Payment_Process2::ACTION_AUTHONLY;
  20. $process->amount = 1.00;
  21.  
  22. $card Payment_Process2_Type::factory('CreditCard');
  23. $card->type = Payment_Process2_Type::CC_VISA;
  24. $card->invoiceNumber = 112345145;
  25. $card->customerId = 1461264151;
  26. $card->cardNumber = '411111111111111';
  27. $card->expDate = '08/2008';
  28. $card->zip = '98123';
  29. $card->cvv = '444';
  30.  
  31.  
  32. $process->setPayment($card);
  33.  
  34. $result $process->process();
  35.  
  36. print_r($result);
  37. echo "\n";
  38. echo "---------------------- RESPONSE ------------------------\n";
  39. echo $result->getMessage()."\n";
  40. echo $result->getCode()."\n";
  41. $validate $result->validate();
  42.  
  43. echo "---------------------- RESPONSE ------------------------\n";
  44.  
  45. ?>

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