PHP code example of allanvb / laravel-walletone

1. Go to this page and download the library: Download allanvb/laravel-walletone 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/ */

    

allanvb / laravel-walletone example snippets


'providers' => [
    // Other service providers...

    Allanvb\LaravelWalletOne\Providers\WalletoneServiceProvider::class,
],

'aliases' => [
    ...
    'WalletOne' => Allanvb\LaravelWalletOne\Facades\WalletOne::class,
],

use Allanvb\LaravelWalletOne\Facades\WalletOne;

WalletOne::make($orderID, $amount, $description, $options);

app('walletone')->make($orderID, $amount, $description, $options);

    protected $routeMiddleware = [
        // Other service providers...
        
        'walletone-payment' => \Allanvb\LaravelWalletOne\Http\Middleware\WalletonePay::class
    ];

Route::post('/payment-webhook', 'YourController')->middleware('walletone-payment');