Verisign Payflow Pro
PHP Manual

pfpro_process

(PHP 4 >= 4.0.2, PHP 5 <= 5.0.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 ]]]]]]] )

pfpro_process() processes a transaction with Payflow Pro.

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

参数

parameters

An associative array containing keys and values that will be encoded and passed to the processor.

address

Specifies the host to connect to. By default this is test.signio.com, that you will certainly want to change this to connect.signio.com in order to process live transactions.

port

Specifies the port to connect on. It defaults to 443, the standard SSL port number.

timeout

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 case of DNS or network problems.

proxy_address

If required, specifies the hostname of your SSL proxy.

proxy_port

If required, specifies the port of your SSL proxy.

proxy_logon

If required, specifies the logon identity to use on the SSL proxy.

proxy_password

If required, specifies the password to use on the SSL proxy.

返回值

Returns an associative array of the keys and values in the response.

范例

Example#1 Payflow Pro example

<?php

pfpro_init
();

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

$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();

?>


Verisign Payflow Pro
PHP Manual