PHP code example of zoopcodificar / zoop
1. Go to this page and download the library: Download zoopcodificar/zoop library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zoopcodificar / zoop example snippets
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);
}
namespace App\Http\Controllers;
use Zoop\src\Facades\ZoopSellers;
class HomeController extends Controller{
$individualSeller = ZoopSellers::create([
'first_name' => 'Rodrigo',
'last_name' => "Miranda",
'email' => "[email protected] ",
'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);
}
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' => '[email protected] ',
]);
dd($buyer);
}
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',
'installment_plan[number_installments]' => '1',
'customer' => 'bb2a51f1c22a4c30b6bf6819be87ac52', //buyer ud
]);
dd($cnp);
}