PHP code example of humayunjavaid / laravel-payzen

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

    

humayunjavaid / laravel-payzen example snippets


return [

    'clientId' => env('PAYZEN_CLIENT_ID'),

    'clientSecretKey' => env('PAYZEN_CLIENT_SECRET_KEY'),

    'authUrl' => env('PAYZEN_AUTH_URL'),

    'psidUrl' => env('PAYZEN_PSID_URL'),

];


$response->body() : string;
$response->json() : array|mixed;
$response->collect() : Illuminate\Support\Collection;
$response->status() : int;
$response->ok() : bool;
$response->successful() : bool;
$response->failed() : bool;
$response->serverError() : bool;
$response->clientError() : bool;
$response->header($header) : string;
$response->headers() : array;


Payzen::setConsumerName('Dummy User')
    ->setCnic('123456789')
    ->setEmail('[email protected]')
    ->setMobileNumber('3324232321')
    ->setChallanNumber('2323232323')
    ->setServiceId('12')
    ->setAccountNumber('32323')
    ->setAccountTitle('Bibi Pak Damin')
    ->setDueDate('2023-08-29')
    ->setExpiryDate('2023-08-29')
    ->setAmountWithinDueDate(500)
    ->setAmountAfterDueDate(500)
    ->generate();
bash
php artisan vendor:publish --tag="laravel-payzen-config"