PHP code example of pwf / laravel-pay

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

    

pwf / laravel-pay example snippets


$app->register(Pwf\LaravelPay\PwfPayServiceProvider::class);

use PwfPay;

$params = [
    "trade_name" => "trade_name",
    "fiat_currency" => "EUR",
    "fiat_amount" => 0.01,
    "out_trade_no" => "order-001",
    "subject" => "order-test",
    "timestamp" => 1657895835,
    "return_url" => "https://www.return.com/return",
    "collection_model" => 1
];

$result = PwfPay::wallet()->payAddress($params);

print_r($result);
Shell
php artisan vendor:publish --provider="Pwf\LaravelPay\PwfPayServiceProvider" --tag=pwf-pay