2017 © Pedro Peláez
 

library zoop

Zoop SDK to Laravel framework version 5.3+

image

adhenrique/zoop

Zoop SDK to Laravel framework version 5.3+

  • Tuesday, July 17, 2018
  • by adhenrique
  • Repository
  • 1 Watchers
  • 0 Stars
  • 661 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 7 Versions
  • 241 % Grown

The README.md

ZOOP Laravel

Zoop-laravel is a package for Laravel 5.3+, which consumes ZOOP payments api's., (*1)

Statistics
Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Requeriments

  • Laravel 5.3+
  • PHP 5.6+
  • PHP ext-curl
  • PHP ext-json
  • PHP ext-mbstring

Instalation

1 - Composer require

Use composer to install the package and automatically update composer.json, running:, (*3)

composer require adhenrique/zoop

2 - Update Laravel configuration

Update your application configuration to register the package in config/app.php adding the following line in 'providers' section:, (*4)

'providers' => [
    //...
    Zoop\ZoopServiceProvider::class,
    //...
],

3 - Publish ZOOP Laravel configuration

Use the following command to publish the configuration settings from config.example.php in zoop/src/resources/config/:, (*5)

php artisan vendor:publish --provider "Zoop\ZoopServiceProvider" --tag="config"

This will create the config/zoopconfig.php configuration file. Now, change the following lines:, (*6)

'defaults'  => [
    //...
    'publishable_key'   => 'YOUR_PUBLISHABLE_KEY',
    'marketplace_id'    => 'YOUR_MARKETPLACE_ID',
    //...
]

...enjoy it :D., (*7)

Usage

1 - Tokenizer Credit Card

In your Controller, (*8)

namespace App\Http\Controllers;

use Zoop\src\Facades\ZoopTokens;

class HomeController extends Controller{
    $ccToken = ZoopTokens::tokenizeCard([
        'holder_name' => 'Makeda Swasey',
        'expiration_month' => "12",
        'expiration_year' => "2015",
        'security_code' => "373",
        'card_number' => "4532395075641483",
    ]);

    dd($ccToken);
}

2 - Creating a new Individual Seller

In your Controller, (*9)

namespace App\Http\Controllers;

use Zoop\src\Facades\ZoopSellers;

class HomeController extends Controller{
    $individualSeller = ZoopSellers::create([
        'first_name' => 'Rodrigo',
        'last_name' => "Miranda",
        'email' => "rodrigo@pagzoop.com",
        'phone_number' => "+12195465432",
        'ssn_last4_digits' => "7551",
        'birthdate' => "1983-09-11",
        'website' => "http://pagzoop.com",
        'facebook' => "https://www.facebook.com/rodrigo",
        'twitter' => "http://twitter.com/hypercreative",
    ]);

    dd($individualSeller);
}

3 - Creating a new Buyer

In your Controller, (*10)

namespace App\Http\Controllers;

use Zoop\src\Facades\ZoopBuyers;

class HomeController extends Controller{
    $buyer = ZoopBuyers::create([
        'first_name' => 'Fabiano',
        'last_name' => 'Cruz',
        'description' => 'Comprador de teste',
        'email' => 'fabiano@example.com',
    ]);

    dd($buyer);
}

4 - Card Not Present Transaction

In your Controller, (*11)

namespace App\Http\Controllers;

use Zoop\src\Facades\ZoopChargeCNP;

class HomeController extends Controller{
    $cnp = ZoopChargesCNP::create([
        'currency' => 'BRL',
        'amount' => '100',
        'payment_type' => 'credit',
        'description' => 'Venda de teste, somente!',
        'statement_descriptor' => 'Descrição de testes',
        'on_behalf_of' => 'bb2a51f1c22a4c30b6bf6819be87ac52',
        'installment_plan' => [
            'mode' => 'interest_free',
            'number_installments' => '1'
        ],
        'customer' => 'bb2a51f1c22a4c30b6bf6819be87ac52', //buyer id
    ]);

    dd($cnp);
}

ZOOP Api Reference

https://docs.zoop.co/v1/reference, (*12)

The Versions

17/07 2018

dev-master

9999999-dev

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest

28/06 2017

v1.0.5

1.0.5.0

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest cartão de crédito

28/06 2017

v1.0.4

1.0.4.0

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest

24/05 2017

v1.0.3

1.0.3.0

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest cartão de crédito

04/05 2017

v1.0.2

1.0.2.0

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest cartão de crédito

28/03 2017

v1.0.1

1.0.1.0

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest cartão de crédito

27/03 2017

v1.0.0

1.0.0.0

Zoop SDK to Laravel framework version 5.3+

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

by Adenilton Henrique Ribeiro

e-commerce zoop pagamento móvel ponto de venda pdv wispot myguest cartão de crédito