1. Go to this page and download the library: Download darkghosthunter/larabanker 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/ */
darkghosthunter / larabanker example snippets
use DarkGhostHunter\Larabanker\Facades\Webpay;
return Webpay::redirect('buy-order#1230', 1000);
use DarkGhostHunter\Larabanker\Facades\Webpay;
$response = Webpay::create('buyOrder#1230', 1000, route('payment'));
return redirect()->away($response, 303);
use \DarkGhostHunter\Larabanker\Facades\Webpay;
use \Illuminate\Support\Facades\Route;
Route::get('transbank/webpay', function (Request $request) {
$transaction = Webpay::commit($request->input('token_ws'));
return view('payment.processed')->with('transaction', $transaction);
})->name('transbank.webpay');
Route::post('transaction/webpay, function (Request $request) {
return view('payment.failed');
})->withoutMiddleware('web');
use \Illuminate\Support\Facades\Route;
use \App\Http\Controllers\WebpayController;
Route::post('/transbank/webpay', [WebpayController::class, 'receivePayment'])
->middleware('larabank.protect');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.