PHP code example of hansvn / laravel-icepay

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

    

hansvn / laravel-icepay example snippets


    # Add `Hansvn\Icepay\IcepayServiceProvider` to the `providers` array
    'providers' => array(
        ...
        'Hansvn\Icepay\IcepayServiceProvider',
    )

    # Add the Icepay alias
    'aliases' => array(
        ...
        'Icepay'          => 'Hansvn\Icepay\Facades\Icepay',
    )
    

    return array(
        'MERCHANTID'	=> xxxxx,//<--- Change this into your own merchant ID
        'SECRETCODE'	=> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",//<--- Change this into your own merchant ID 
        ...
    );
    

    return array(
    	...
        'log'			=> true,
    );
    

$icepay = \Icepay::paymentObject();
$icepay->setAmount(1000)
			->setCountry("BE")
			->setLanguage("NL")
			->setReference("My Sample Website")
			->setDescription("My Sample Payment")
			->setCurrency("EUR");

$basic = Icepay::basicMode();
$basic->validatePayment($icepay);

return sprintf("<a href=\"%s\">%s</a>",$basic->getURL(),$basic->getURL());
shell
    $ php artisan config:publish hansvn/laravel-icepay