1. Go to this page and download the library: Download pagocards/php-laravel 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/ */
pagocards / php-laravel example snippets
use Pagocards\SDK\Facades\Pagocards;
// Create a Mastercard
$card = Pagocards::createMastercard([
'email' => '[email protected]',
'firstname' => 'John',
'lastname' => 'Doe'
]);
// Create a Visa Card
$card = Pagocards::createVisacard([
'email' => '[email protected]',
'firstname' => 'John',
'lastname' => 'Doe'
]);
// Fund a Visa Card
$result = Pagocards::fundVisacard('card_id', 100.00);
// Get card details
$card = Pagocards::getCard('card_id', 'visacard');
// List cards
$cards = Pagocards::listCards('visacard', 1, 50);
// Block/Unblock Mastercard
Pagocards::toggleCard('card_id', 'block', 'mastercard');
Pagocards::toggleCard('card_id', 'unblock', 'mastercard');
// Get wallet balance
$balance = Pagocards::getBalance();
use Pagocards\SDK\Client;
$client = new Client(
'your_public_key',
'your_secret_key',
'https://pagocards.com'
);
// Use all the same methods as the facade
$card = $client->createVisacard([
'email' => '[email protected]',
'firstname' => 'John',
'lastname' => 'Doe'
]);