2017 © Pedro Peláez
 

library omnipay-merchant-warrior

Omnipay package for the Merchant Warrior payment gateway based on https://github.com/soda-framework/omnipay-merchant-warrior

image

kimoslim/omnipay-merchant-warrior

Omnipay package for the Merchant Warrior payment gateway based on https://github.com/soda-framework/omnipay-merchant-warrior

  • Monday, May 28, 2018
  • by kimosabi77
  • Repository
  • 1 Watchers
  • 0 Stars
  • 37 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 147 % Grown

The README.md

Omnipay Merchant Warrior

Merchant Warrior API implemention, (*1)

Omnipay is a framework agnostic, multi-gateway payment processing library. This package implements components of the Merchant Warrior Direct API., (*2)

Installation

Omnipay is installed via Composer. To install, simply add it to your composer.json file:, (*3)

{
    "require": {
        "composer require kimoslim/omnipay-merchant-warrior": "dev-master"
    }
}

Basic Usage

The following gateways are provided by this package:, (*4)

  • Merchant warrior Direct API (Following methods are done, although currently untested)
    • processAuth
    • processCapture
    • processCard

Purchase Example

$gateway = Omnipay::create('MerchantWarrior');
$gateway->setMerchantUUID('merchant UUID');
$gateway->setApiKey('API KEY');
$gateway->setApiPassphrase('API PASS');

$card = new CreditCard(array(
    'firstName'          => 'Joe',
    'lastName'           => 'Bloggs',
    'number'             => '4444333322221111',
    'expiryMonth'        => '01',
    'expiryYear'         => '2019',
    'billingAddress1'    => 'street',
    'billingCountry'     => 'AU',
    'billingCity'        => 'SUBURB',
    'billingPostcode'    => 'POSTCODE',
    'billingState'       => 'STATE',
    'email'              => 'me@emailaddress.com',
));
$purchase = [
    'amount'            => '1.00',
    'currency'          => 'AUD',
    'transactionType'   => 'Purchase',
    'transactionId'     => 'TRANSACTION ID',
    'transactionProduct'=> 'Test Transaction Description',
    'card'              => $card
];
$request = $gateway->purchase($purchase);
$response = $request->send();
if ($response->isSuccessful()) {
    // insert the transaction
    $txn_id = $response->getTransactionReference();
    $auth_code = $response->getAuthCode();
    $message = $response->getMessage();
    echo 'Payment successful: TXN ID - '.$txn_id.' auth code: '.$auth_code.' message:'.$message.PHP_EOL;
}
else
{
    echo 'Credit Card Failed: '.$response->getMessage().PHP_EOL;
}

Authorize Example

$authorize = [
    'amount'            => '1.00',
    'currency'          => 'AUD',
    'transactionType'   => 'Authorize',
    'transactionId'     => 'TRANSACTION ID',
    'transactionProduct'=> 'Test Authorisation Description',
    'card'              => $card
];
$request = $gateway->authorize($authorize);
$response = $request->send();
if ($response->isSuccessful()) {
    // insert the transaction
    $txn_id = $response->getTransactionReference();
    $auth_code = $response->getAuthCode();
    $message = $response->getMessage();
    echo 'Payment successful: TXN ID - '.$txn_id.' auth code: '.$auth_code.' message:'.$message.PHP_EOL;
}
else
{
    echo 'Credit Card Failed: '.$response->getMessage().PHP_EOL;
}

More details of Merchant Warrior's API can be found at Merchant Warrior, (*5)

For general usage instructions, please see the main Omnipay repository., (*6)

The Versions

28/05 2018

dev-master

9999999-dev

Omnipay package for the Merchant Warrior payment gateway based on https://github.com/soda-framework/omnipay-merchant-warrior

  Sources   Download

The Requires

 

payment pay gateway merchant omnipay warrior merchantwarrior

21/11 2016

0.1.2

0.1.2.0

Omnipay package for the Merchant Warrior payment gateway

  Sources   Download

The Requires

 

by Jarrad Littleford

payment pay gateway merchant omnipay warrior merchantwarrior

17/11 2016

0.1.1

0.1.1.0

Omnipay package for the Merchant Warrior payment gateway

  Sources   Download

The Requires

 

by Jarrad Littleford

payment pay gateway merchant omnipay warrior merchantwarrior

17/11 2016

0.1.0

0.1.0.0

Omnipay package for the Merchant Warrior payment gateway

  Sources   Download

The Requires

 

by Jarrad Littleford

payment pay gateway merchant omnipay warrior merchantwarrior