The Galahad Payment Layer provides a unified API for authorizing and capturing credit card payments through a number of gateways. Currently Authorize.net is the only supported gateway, but others will be developed over time. Galahad PL is in very early stages of development, and should not be used on production sites. Here’s a simple example of its use:
$gateway = new Galahad_Gateway_AuthorizeNet($login, $tranKey);
$card = new Galahad_CreditCard('4222222222222', 4, 10);
$transaction = new Galahad_Gateway_Transaction(null, 2.00, $card, 'Description of $2 purchase');
$response = $gateway->capture($transaction, true);
if ($response->isApproved()) {
echo 'Approved';
} else {
echo 'Declined';
}
Galahad PL requires PHP5 with cURL and OpenSSL installed.
Galahad Payment Layer [47.26 KB]Additional comments powered by BackType
You can leave a response, or trackback from your own site. Follow any responses to this entry through the RSS 2.0 feed.
Recent Comments