From 9ee9eaab3a4a968519842e581ee324cecba25ce2 Mon Sep 17 00:00:00 2001 From: David Croft Date: Sat, 15 Jul 2000 03:07:49 +0000 Subject: [PATCH] test file for pfpro --- ext/pfpro/test.php | 2 +- tests/testpfpro.php | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 tests/testpfpro.php diff --git a/ext/pfpro/test.php b/ext/pfpro/test.php index 712cc073cb..dd772dc2b4 100644 --- a/ext/pfpro/test.php +++ b/ext/pfpro/test.php @@ -38,6 +38,6 @@ echo "\n"; echo "Dump of the response "; print_r($response); -pfpro_cleanup() +pfpro_cleanup(); ?> diff --git a/tests/testpfpro.php b/tests/testpfpro.php new file mode 100644 index 0000000000..ffb1784bdc --- /dev/null +++ b/tests/testpfpro.php @@ -0,0 +1,39 @@ +\n\n"; + +echo "Payflow Pro library is version ".pfpro_version()."\n"; + +pfpro_init(); + +$transaction = array(USER => 'mylogin', + PWD => 'mypassword', + TRXTYPE => 'S', + TENDER => 'C', + AMT => 1.50, + ACCT => '4111111111111111', + EXPDATE => '0900' + ); + +$response = pfpro_process($transaction); + +if (!$response) { + die("Couldn't establish link to signio software.\n"); +} + +echo "Signio response code was ".$response[RESULT]; +echo ", which means: ".$response[RESPMSG]."\n"; + +echo "\nDump of the transaction request "; +print_r($transaction); + +echo "\nDump of the response "; +print_r($response); + +pfpro_cleanup(); + +?> -- 2.40.0