Hey guys!
Anyone out there fimiliar with the Versign's Payflow Pro & PHP's pfpro() Functions?
I am having trouble sending the correct values to my PayFlow Pro Client.
Here is a slightly modified script that I found on php.net to make Versign's Payflow Pro Integrate with PHP
<?
pfpro_init();
$transaction = array('USER' => 'username',
'PWD' => 'password',
'PARTNER' => 'partner',
'TRXTYPE' => 'S',
'TENDER' => 'C',
'AMT' => '1.50',
'ACCT' => '4111111111111111', // CC Number
'EXPDATE' => '09/04',
'EMAIL' => 'skullet@mullet.org',
'NAME' => 'Jason Weathers',
'STREET' => '1400 Pennsylvania Ave.',
'CITY' => 'Washington',
'STATE' => 'DC',
'ZIP' => '12364-8923',
'ORDERDATE' => '06/17/03', // Order date
'CUSTCODE' => '143', // Customer ID
);
$response = pfpro_process($transaction);
if (!$response) {
die("Couldn't establish link to Verisign.\n");
}
echo "Verisign response code was ".$response['RESULT'];
echo ", which means: ".$response['RESPMSG']."\n";
echo "\nThe transaction request: ";
print_r($transaction);
echo "\nThe response: ";
print_r($response);
pfpro_cleanup();
?>
Now the script works fine, but i need things to work a little diferently. In the above script the values being sent ot payflow pro are strings. I need to be able to send variable values to payflow pro.
When i try to replace say the NAME "Jason Weathers" with the variable "$name" or just $name without the quotes... I get an error and the $name shows up in the Verisign Manager.
The data i need sent to payflow pro is collected from a user by a form. So the data is held in variables.... Is there another way to set this script up where i can send the value of a variable to PayFlow Pro ???
I hope you guys understand what i mean. Any help is appreciated!