[Typo3-dev] Service for Online Payments
Seibert, Norman
seibert at entios.de
Tue Mar 1 17:00:45 CET 2005
Hi all,
to enable online payments via credit cards I am implementing a service
supporting VeriSign Payflow Pro (Windows version in the first step). The
payment gateway must handle background transactions that means that the
user is not redirected to an external page like in the eCardia
extension.
As a name for the service class I propose "onlinePayment".
At the moment I use the following API (although Payflow Pro does not use
all the fields described below):
/**
* [submits the payment to Payflow Pro]
*
* @param [array] $arrCCard: Array with credit card data
* @param [array] $arrTrans: Array with transaction data
* @return [string] $transactionCode: Unique
transaction code returned by Payflow Pro
* @return [array] $arrResponse: Array with response
parameters
* @return [boolean] true = transaction successful,
false = transaction failed
*/
function submitPayment($arrCCard, $arrTrans, &$transactionCode,
&$arrResponse)
$arrCCard = Array (
'type' => 'VISA',
'number' => '4111111111111111',
'expdate' => '0207', //mmyy
'cardholder' => 'Norman Seibert',
'checksum' => '123',
);
$arrTrans = Array (
'street' => 'elm street 2',
'zip' => '12345',
'comment1' => 'comment line 1',
'comment2' => 'comment line 2',
'netamount' => '123.10',
'currency' => 'USD',
);
The content of $arrResponse depends on the payment gateway; basically it
contains name/value pairs returned by the gateway.
I am looking forward to your comments and would be glad if someone would
implement services for other payment gateways to establish a standard.
Best wishes
Norman Seibert
More information about the TYPO3-dev
mailing list