Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

This package makes it easy to use eRede PHP SDK with the Laravel framework.

License

Notifications You must be signed in to change notification settings

lucasgiovanny/laravel-erede

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eRede API for Laravel

THIS PROJECT IS NO LONGER BEING MAINTAINED

This package makes it easy to use eRede PHP SDK with Laravel framework.

Contents

Installation

This package can be installed via composer:

composer require lucasgiovanny/laravel-erede

Set the enviroments variables in your .env file

REDE_PV=
REDE_TOKEN=
REDE_SANDBOX=false

Usage

To use this package, you just need to import the Rede Facades.

use  lucasgiovanny\ERede\Facades\Rede;

Available methods

authorize

Param Type Default
total float (required)
reference string (required)
creditcard array (required)
capture bool true
installments int 1

Example:

use  lucasgiovanny\ERede\Facades\Rede;

$creditCard = [
'cardNumber'  =>  "5448280000000007",
'cardCvv' => '123'
'cardExpirationMonth'  =>  '12',
'cardExpirationYear'  =>  '2020',
'cardHolder'  =>  'Walter White',
];

$transaction = Rede::authorize(100.99, 'Order 45', $creditCard);

if ($transaction->getReturnCode() == '00') {
    printf("Success! tid=%s\n", $transaction->getTid());
}
  • Transactions are captured by default, if you don't want this, you can set the capture parameter to false.

  • To set installments, just use the last parameter.

cancel

Param Type
transaction string (required)

Example:

use  lucasgiovanny\ERede\Facades\Rede;

$transaction = Rede::cancel('TID123');

get

Param Type
transaction string (required)

Example:

use  lucasgiovanny\ERede\Facades\Rede;

$transaction = Rede::get('TID123');

getByReference

Param Type
reference string (required)

Example:

use  lucasgiovanny\ERede\Facades\Rede;

$transaction = Rede::getByReference('TID123');

getRefunds

Param Type
transaction string (required)

Example:

use  lucasgiovanny\ERede\Facades\Rede;

$transaction = Rede::getRefunds('TID123');

To do List

  • Tests

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Test needs to be written. Feel free to collaborate.

Security

If you discover any security related issues, please email lucasgiovanny@gmail.com instead of using the issue tracker.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

This package makes it easy to use eRede PHP SDK with the Laravel framework.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages