PHP code example of tricciardi / laravel-multibanco
1. Go to this page and download the library: Download tricciardi/laravel-multibanco 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/ */
tricciardi / laravel-multibanco example snippets
namespace App\Http\Controllers;
use tricciardi\LaravelMultibanco\Multibanco;
class TestController extends Controller
{
public function index() {
$multibanco = new Multibanco;
$reference = $multibanco->getReference(1,1, '2018-11-30');
//make mbway purchase
$mbway = $multibanco->mbway_authorize('teste','9xxxxxxxxx');
}
}
php artisan vendor:publish
define options on config/multibanco.php
php artisan mb:getpayments
php artisan mb:getdaily