(PHP 4 >= 4.0.2, PHP 5)

pfpro_process -- Process a transaction with Payflow Pro


array pfpro_process ( array parameters [, string address [, int port [, int timeout [, string proxy_address [, int proxy_port [, string proxy_logon [, string proxy_password]]]]]]])

Returns: An associative array containing the response

pfpro_process() processes a transaction with Payflow Pro. The first parameter is an associative array containing keys and values that will be encoded and passed to the processor.

The second parameter is optional and specifies the host to connect to. By default this is "", so you will certainly want to change this to "" in order to process live transactions.

The third parameter specifies the port to connect on. It defaults to 443, the standard SSL port.

The fourth parameter specifies the timeout to be used, in seconds. This defaults to 30 seconds. Note that this timeout appears to only begin once a link to the processor has been established and so your script could potentially continue for a very long time in the event of DNS or network problems.

The fifth parameter, if required, specifies the hostname of your SSL proxy. The sixth parameter specifies the port to use.

The seventh and eighth parameters specify the logon identity and password to use on the proxy.

The function returns an associative array of the keys and values in the response.

Note: Be sure to read the Payflow Pro Developers Guide for full details of the required parameters.

Example 1. Payflow Pro example



$transaction = array('USER'    => 'mylogin',
'PWD'     => 'mypassword',
'PARTNER' => 'VeriSign',
'TRXTYPE' => 'S',
'TENDER'  => 'C',
'AMT'     => 1.50,
'ACCT'    => '4111111111111111',
'EXPDATE' => '0904'

$response = pfpro_process($transaction);

if (!
$response) {
"Couldn't establish link to Verisign.\n");

"Verisign response code was " . $response['RESULT'];
", which means: " . $response['RESPMSG'] . "\n";

"\nThe transaction request: ";

"\nThe response: ";



Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples
  Copyright 2004 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft