Active Merchant for Akelos PHP Framework
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tests
LICENSE
MAINTAINERS
README
TODO
init.php

README

WARNING!
---------
USE ONLY ON FRESH AKELOS INSTALLATIONS AS IT MIGHT OVERRIDE YOUR EXISTING FILES!!!


ActiveMerchant Plugin
===================================

The ActiveMerchant plugin will allow you to easily interface with payment processors through a common interface

It is a port of Ruby's Active Merchant component (http://www.activemerchant.org/)

Installation
--------------------------------

akelos your_project
cd your_project
./script/configure -i
./script/plugin install /local/path/to/active_merchant
cd app/vendor/plugins/active_merchant/

# to run all the tests of the plugin
php tests/active_merchant.php 

# to run only a specific test
php tests/lib/notification.php 

Usage
--------------------------------
<?php
$tendollar = 1000;
$creditcard = new ActiveMerchantCreditCard (
    :number => '4111111111111111',
    :month => 8,
    :year => 2006,
    :first_name => 'Longbob',
    :last_name => 'Longsen'
);
$gateway = new ActiveMerchantWorldPayGateway(array('login' => 'TestMerchant', 'password' => 'password'));
$response = $gateway->purchase($tendollar, $creditcard);
if($response->isSuccess()) {
    $m = $response->getMessage();
}
$trandId = response->params['transid'];