Source for file linkpoint.php
Documentation is available at linkpoint.php
require_once('Payment/Process.php');
// If you have a test store on the staging server uncomment these
// $options['host'] = 'staging.linkpt.net';
// $options['port'] = '1129';
// Path to your keyfile (the pem file given to you by linkpiont)
$options['keyfile'] = '/path/to/your/keyfile.pem';
if (!PEAR ::isError ($process)) {
$process->login = 'xxxxxxxxxx'; // Your linkpoint store ID
$process->password = '12345678'; // Your store's password
if (!PEAR ::isError ($card)) {
$card->invoiceNumber = 112345145;
$card->customerId = 1461264151;
$card->cardNumber = '411111111111111';
$card->expDate = '08/2008';
if(!$process->setPayment ($card)) {
die ("Unable to set payment\n");
$result = $process->process ();
if (PEAR ::isError ($result)) {
echo $result->getMessage (). "\n";
echo "---------------------- RESPONSE ------------------------\n";
echo $result->getMessage (). "\n";
echo $result->getCode (). "\n";
$validate = $result->validate ();
if(!PEAR ::isError ($validate)) {
echo "ERROR: ". $validate->getMessage (). "\n";
echo "---------------------- RESPONSE ------------------------\n";
echo 'Something is wrong with your card!'. "\n";
echo $card->getMessage (). "\n";
echo $payment->getMessage (). "\n";
Documentation generated on Mon, 11 Mar 2019 14:00:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|