LaravelPackages.net
Acme Inc.
Toggle sidebar
nicklace/laravel-icepay

Laravel integration of the icepay api

4
0
v0.1
About nicklace/laravel-icepay

nicklace/laravel-icepay is a Laravel package for laravel integration of the icepay api. It currently has 0 GitHub stars and 4 downloads on Packagist (latest version v0.1). Install it with composer require nicklace/laravel-icepay. Discover more Laravel packages by nicklace or browse all Laravel packages to compare alternatives.

Last updated

Laravel Icepay for Laravel 5.1

Updated the code from the Laravel Icepay package to be able to use it with Laravel 5.1

Requirements

  • PHP >=5.5
  • Laravel >= 5.1

Getting started


Laravel >= 5.1

  1. Install the phamels/laravel-icepay package

    $ composer require phamels/laravel-icepay:dev-master
    
  2. Update app/config/app.php` to activate the package

    # 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,
    )
    
  3. Define the config parameters in your config/services.php file

        'icepay' => [
            'MERCHANTID'	=> xxxxx,
            'SECRETCODE'	=> "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            'log'			=> true
        ],
    

Usage

Below is a simple usage example of this package

Generate a payment link for €10,00:

$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());

Contributing

Contributions are welcome.

Todo's

  • Write tests

Star History Chart