Skip to content

Komerci WebService (Rede) driver for the Omnipay PHP payment processing library

License

Notifications You must be signed in to change notification settings

byjg/omnipay-komerci

Repository files navigation

Omnipay: Komerci WebServer (Rede)

Build Status Scrutinizer Code Quality SensioLabsInsight Latest Stable Version Total Downloads License

Komerci WebService (Rede) driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+.

Installation

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

{
    "require": {
        "byjg/omnipay-komerci": "~1.0"
    }
}

And run composer to update your dependencies:

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Basic Usage

The following gateways are provided by this package:

  • Komerci (Rede)

Komerci is the solution for e-commerce from Rede (former Redecard). Rede is a Brazilian acquirer. This is responsible for the authentication, authorization and capture the card data in the Rede environment.

NOTE: Before using this driver is necessary to register the IP in the Komerci website. If your IP is not registered you'll get an error 500 or an error code 23 - "Transação não autorizada".

// Setup payment gateway
$gateway = Omnipay::create('Komerci');
$gateway->setApiKey('00000000');
$gateway->setUsername('user');
$gateway->setPassword('pass');
$gateway->setTestMode(true);

// Example form data
$formData = [
    'name' => 'Joao Magalhaes',
    'number' => '4242424242424242',
    'expiryMonth' => '6',
    'expiryYear' => '2016',
    'cvv' => '123'
];

// Send purchase request
$response = $gateway->purchase(
    [
        'amount' => '10.00',
        'transactionId' => '1234',
        'card' => $formData,
    ]
)->send();

Komerci have a test environment where the credicard will not be charged but you'll receive real messages for testing your system. Just use $gateway->setTestMode(true) for use the test environment.

For general usage instructions, please see the main Omnipay repository.

Implemented methods

  • authorize
  • capture
  • purchse
  • void

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

About

Komerci WebService (Rede) driver for the Omnipay PHP payment processing library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages