summaryrefslogtreecommitdiff
path: root/tests/testpfpro.php
diff options
context:
space:
mode:
authorDavid Croft <david@php.net>2000-07-15 03:07:49 +0000
committerDavid Croft <david@php.net>2000-07-15 03:07:49 +0000
commit9ee9eaab3a4a968519842e581ee324cecba25ce2 (patch)
tree5916c71f3f2e446d042fc3376b71f9a354cbfb37 /tests/testpfpro.php
parentc1877a3a30e84ec80e4791b3c837444612906781 (diff)
downloadphp-git-9ee9eaab3a4a968519842e581ee324cecba25ce2.tar.gz
test file for pfpro
Diffstat (limited to 'tests/testpfpro.php')
-rw-r--r--tests/testpfpro.php39
1 files changed, 39 insertions, 0 deletions
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 @@
+<?
+
+if (!extension_loaded('pfpro')) {
+ die("pfpro module is not compiled in PHP\n");
+}
+
+echo "<pre>\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();
+
+?>