GithubHelp home page GithubHelp logo

silvanlaroo / laravel-ideal-sisow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vjanssens/laravel-ideal-sisow

0.0 2.0 0.0 159 KB

Laravel 4 package for easy iDeal payments via Sisow

PHP 100.00%

laravel-ideal-sisow's Introduction

Easy iDeal payments via Sisow

Laravel 4 package

This package is in active development.

Installation

Require the package via Composer in your composer.json.

"require": {
	...
	"vjanssens/laravel-sisow": "dev-master"
},

Run the next line to update dependencies (and thus download this package)

php composer.phar update

After Composer has succesfully updated the dependencies proceed to add your MerchantID, MerchantKey and all of the default values to /vendor/vjanssens/laravel-sisow/src/config/config.php

Finally add the next two lines in /app/config/app.php

// File: app/config/app.php

'providers' => array(
    ...
    'Vjanssens\LaravelSisow\LaravelSisowServiceProvider',

),

'aliases' => array(
	...
	'Sisow'			  => 'Vjanssens\LaravelSisow\Facades\Sisow',
),

The package has been installed and you are ready to accept iDeal payments.

Request banks

This method will fetch the banks where iDeal transactions can be done.

Best practice is to set testmode inside the config.php file but if you need to switch quickly you can pass getBanks(true).

$banks = Sisow::getBanks($testmode);
echo $banks;

Request a payment URL

This method will fetch a URL where the payment will be processed. Description, NotifyURL, ReturnURL and CancelURL can be set in config.php

$args = array(

	'PurchaseID' 	=> '001', 	// unique ID per purchase
	'Amount'	 	=> '1.00',	// amount in EUR, minimal 0.45
	'IssuerID'	 	=> '99',	// bank ID 

	'Description'	=> 'Payment description',					// optional, see config file
	'NotifyURL'		=> 'http://www.yourdomain.com/notify',		// optional, see config file
	'ReturnURL'		=> 'http://www.yourdomain.com/return',		// optional, see config file
	'CancelURL'		=> 'http://www.yourdomain.com/cancel',		// optional, see config file
);

$paymentURL = Sisow::getPaymentURL($args);

echo '<pre>';
dd($paymentURL);

//return Redirect::to($paymentURL['url']);

Get status of transaction (after payment)

After a transaction has been made, Sisow will sent through a unique Transaction ID which can be used to get the status of a given transaction. (Succes, canceled, expired or failure)

$transactionId = Input::get('trxid');

$status = Sisow::getStatus($transactionId);

echo '<pre>';
dd($status);

laravel-ideal-sisow's People

Contributors

vjanssens avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.