PHP code example of pdazcom / laravel-walletone

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

    

pdazcom / laravel-walletone example snippets


php artisan vendor:publish --provider='Pdazcom\LaravelWalletOne\Providers\WalletoneServiceProvider' 

$options = [
   'WMI_DESCRIPTION' => 'Pay for account balance',
   'WMI_PAYMENT_AMOUNT' => 100,
];

\WalletOne::addWalletOptions($options)
$xslt
$fields = \WalletOne::getFields()

// FailedPaymentListener
public function handle(FailedPayment $event)
{
    $postData = $event->postData;
    $exception = $event->exception
}

// SuccessPaymentListener
public function handle(SuccessPayment $event)
{
    $postData = $event->postData;
}