2017 © Pedro PelĂĄez
 

library omnipay-rede-rest-api

Rede driver for the Omnipay payment processing library

image

waldson/omnipay-rede-rest-api

Rede driver for the Omnipay payment processing library

  • Wednesday, November 8, 2017
  • by waldson
  • Repository
  • 1 Watchers
  • 0 Stars
  • 378 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 26 % Grown

The README.md

Omnipay: Rede

Rede Rest API's driver for the Omnipay PHP payment processing library, (*1)

Installation

This library is installed via Composer. To install it, call:, (*2)

composer require waldson/omnipay-rede-rest-api

Supported Methods

The following methods are supported by this package:, (*3)

  • authorize
  • capture
  • purchase (authorize + catpure in a single step)
  • refund
  • fetchTransaction

Basic Usage

The following gateway is provided by this package:, (*4)

  • Rede

Example

use Omnipay\Omnipay;

$gateway = Omnipay::create('Rede');
$gateway->setMerchantId($yourCV); // Filiação
$gateway->setMerchantKey($yourToken); // Token

$card     = array('number' => '4242424242424242', 'expiryMonth' => '6', 'expiryYear' => '2030', 'cvv' => '123', 'name' => 'Holder name');
$response = $gateway->purchase(array('amount' => '10.00', 'reference' => '1', 'card' => $card))->send(); //or authorize(...)

if ($response->isSuccessful()) {
    // payment was successful: update database
    $transactionId = $response->getTransactionId();

    //with transactionId you can fetch...
    $transactionInfo = $gateway->fetchTransaction(['transactionId' => $transactionId]); //you can pass 'reference' too

    //refund...
    $response = $gateway->refund(['transactionId' => $transactionId, 'amount' => '10.00']);

    //or capture (don't work with purchase, you can only capture authorized requests)
    $response = $gateway->capture(['transactionId' => $transactionId, 'amount' => '10.00']);

} else {
    // payment failed: display message to customer
    $errorMessage = $response->getMessage();
    $errorCode    = $response->getCode();
    ...
}

Support

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., (*5)

PS: Rede is a brazillian payment gateway., (*6)

The Versions

08/11 2017

dev-master

9999999-dev

Rede driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant omnipay rede

08/11 2017

1.0.3

1.0.3.0

Rede driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant omnipay rede

08/11 2017

1.0.2

1.0.2.0

Rede driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant omnipay rede

08/11 2017

1.0.1

1.0.1.0

Rede driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant omnipay rede

08/11 2017

1.0

1.0.0.0

Rede driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

payment pay gateway merchant omnipay rede