PHP code example of phamels / laravel-icepay

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

    

phamels / laravel-icepay example snippets


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

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

        'icepay' => [
            'MERCHANTID'	=> xxxxx,
            'SECRETCODE'	=> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            '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());