eventix/omnipay-first-atlantic-commerce

First Atlantic Commerce V3 driver for the Omnipay PHP payment processing library

dev-master 2019-03-05 05:22 UTC

This package is auto-updated.

Last update: 2024-11-05 20:23:57 UTC


README

#omnipay-first-atlantic-commerce V3 Only used in combination with hostedPaymentSolution

$gateway = Omnipay::create('FAC');
$gateway->setMerchantId('xxxxx');
$gateway->setMerchantPassword('xxxxx');
$gateway->setAquirerId('xxxx');
$gateway->setTestMode(true);

$orderId = '5d096925-9795-47d0-aade-9d8ed584eb9f';

if(isset($_GET['ID'])){
    $options = array(
        'orderNumber' => $orderId,
    );

    $response = $gateway->fetchTransaction($options)->send();
    $error = $response->getMessage();
    $isPaid = $response->isPaid();
}


$options = array(
    'orderNumber' => $orderId,
    'amount' => '10.00',
    'currency' => 'USD',
    'returnUrl' => 'http://someurl.com/',
    'pageSet' => 'PageSet',
    'pageName' => 'PageName',
    'transactionCode' => '213'
);

$response = $gateway->purchase($options)->send();
$singeUseToken = $transactionId = $response->getTransactionReference();
header('Location: '. $response->getRedirectUrl());
exit;