You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
750 B

  1. <?
  2. if (!extension_loaded('pfpro')) {
  3. die("pfpro module is not compiled in PHP\n");
  4. }
  5. echo "<pre>\n\n";
  6. echo "Payflow Pro library is version ".pfpro_version()."\n";
  7. pfpro_init();
  8. $transaction = array(USER => 'mylogin',
  9. PWD => 'mypassword',
  10. TRXTYPE => 'S',
  11. TENDER => 'C',
  12. AMT => 1.50,
  13. ACCT => '4111111111111111',
  14. EXPDATE => '0900'
  15. );
  16. $response = pfpro_process($transaction);
  17. if (!$response) {
  18. die("Couldn't establish link to signio software.\n");
  19. }
  20. echo "Signio response code was ".$response[RESULT];
  21. echo ", which means: ".$response[RESPMSG]."\n";
  22. echo "\nDump of the transaction request ";
  23. print_r($transaction);
  24. echo "\nDump of the response ";
  25. print_r($response);
  26. pfpro_cleanup();
  27. ?>