iDEAL payment – ING Bank – iDEAL Advance Integration

In Payment Gateway on March 2nd, 2010

It’s always not easy to work with payment gateway service as each gateway service has different of configuration options, parameters. Lastly, I found iDEAL as weired/tough. You will hardly find documentation in English. So, I thought share idea how I did configure iDEAL Advance using PHP (ING bank).

In summery, it takes following steps to setup iDEAL Advance:

  1. Registration
  2. Integration
  3. Run mandatory test cases in iDEAL test environment
  4. iDEAL approve test cases and contract (you should sign up contract)
  5. Live account has to be activated (See below Mandatory Test)
  6. So, your live sale can be done in iDEAL.

Follow details steps below:

  1. Login to iDEAL/ING Dashboard (Given below are URL for dashboard)
    Test environment: https://idealtest.secure-ing.com
    Production environment: https://ideal.secure-ing.com
    Note: Merchant ID and Login name is same for both test and live. But password is different for live and test.
  2. Once you login, first thing you need to go to Document link. There you can download documentation and Advance integration code. Documentation is available in English and Dutch.
    Important Downloads:
    a) iDEAL General – Introduction and procedure (Click on link to get manual)
    b) iDEAL Advanced Integration Manual PHP (Click on link to get manual)
    c) iDEAL Advanced Integration Code PHP (Sorry,  no links, ups!!)
    Note: You should be aware about registration process. Look “Registration process (2)” in iDEAL General – Introduction and procedure
  3. To integrate Advance iDEAL in PHP, follow instruction in “iDEAL Advanced Integration Manual PHP”, there are lot of steps you should follow carefully. In summery:
    1) Generate private key using openSSL
    2) Generate certificate using private key.
    3) Upload certificate to configuration (Login to iDEAL dashboard -> Go to sign up process -> Click on Configuration tab)
    4) Change params value in config.conf which available in /includes/security.
    5) Also you should edit iDEALConnector_config.inc.php if you move security folder then then default.
  4. Upload scripts (PHP Advanced Code)
  5. Run 6 tests in iDEAL test environment. Wait for iDEAL response on your test.  (See below Mandatory Test)
  6. iDEAL has to set live account activate. Now your gateway is ready!!

Mandatory Test:

You should run mandatory test before you can set iDEAL live. Look “Registration process (2)” in iDEAL General – Introduction and procedure. It’s not easy to setup online store to configure to meet test suite requirement. Hence, you can use iDEAL Tester, which you can download from http://www.ideal-simulator.nl/ideal-professional-tester.html.

Once you download scripts, make changes on idealprofessional.cfg.php file which is located inside library folder. Upload scripts to server and access it http://<host>/ideal-professional-tester/index.php

You can confirm tests status from iDEAL dashboard.

  1. Login to Dashboard (test and live has different dashboard)
  2. Click on Sign up Process
  3. Click on Status (You’ll see following screen if test successes).

    iDEAL mandatory test results

    iDEAL mandatory test results

  4. Once you finish test suits, iDEAL will activate live account. It may take several hours, so I suggest you to call their support dept. and ask them to activate (it speed up).
  5. Once they activate your live account, your live dashboard looks different as given below.

iDEAL live dashboard (after activated)
Note: You should run this test on same domain where your online store will resides.

Note: this post describe process how to integrate iDEAL Adanced (ING Bank) using PHP APIs.

Configuring iDEAL basic is very easy which works with post method by redirecting URL to their gateway.

If you have done for any other Bank or other way, let me know.

Update: for iDEAL Basic click this link

Asterisk GUI, accessing from browser

In Asterisk on February 23rd, 2010

I Installed Asterisk GUI 2.0 and configured it successfully,

I check with

  1. $ make checkconfig.

Got following output:

 --- Checking Asterisk configuration to see if it will support the GUI ---
* Checking for http.conf: OK
* Checking for manager.conf: OK
* Checking if HTTP is enabled: OK
* Checking if HTTP static support is enabled: OK
* Checking if manager is enabled: OK
* Checking if manager over HTTP is enabled: OK
 --- Everything looks good ---
 * GUI should be available at http://<host>:8088/asterisk/static/config/index.html [^] 

 * Note: If you have bindaddr=127.0.0.1 in /etc/asterisk/http.conf
   you will only be able to visit it from the local machine. 

   Example: http://localhost:8088/asterisk/static/config/index.html [^]

 * The login and password should be an entry from /etc/asterisk/manager.conf
   which has 'config' permission in read and write. For example:

    [admin]
    secret = mysecret2820
    read = system,call,log,verbose,command,agent,config
    write = system,call,log,verbose,command,agent,config

 --- Good luck! ---

In httpd.conf, I have:

[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
enablestatic=yes

In manager.conf, I have:

enabled = yes
webenabled = yes
port = 5038
bindaddr = 0.0.0.0

[astercc]
secret = astercc
read = system,call,log,verbose,command,agent,user
write = system,call,log,verbose,command,agent,user
deny=0.0.0.0/0.0.0.0
permit=192.168.1.253/255.255.255.0

But, when I tried to access it

http://<host>:8088/asterisk/static/config/index.html [^] or
http://<ip>:8088/asterisk/static/config/index.html [^]

It doesn’t work. I get 404 error. Instead, you should try

http://<host>:8088/static/config/index.html
http://<ip>:8088/static/config/index.html

I had nice discussion on asterisk IRC, it would be nice to have http://<host>:8088 redirected to actual URL. Why should user type that long/confusing URL.

Asterisk GUI

Asterisk GUI 2.0 is still in development. It’s not easy to install. As of current development, I manage to install in following way:

  1. Install DAHDi. I gave 777 permission to DAHDi to install (otherwise make all do not work)
  2. Once you install DAHDi, you can access GUI from browser
  3. But there will be permission issue so. I again did $sudo chmod -R 777 /etc/asterisk and $sudo chmod -R 777 /var/lib/asterisk/static-http/config
  4. Run Asterisk GUI from browser. But it will take lot of time. It says, checking permission for gui folder, detecting hardware. After waiting more then 5/7 minute, you’ll get page loaded.

Important: I have given 777 permission because I was testing in local box and I was desperate to see GUI. Don’t do 777 stupidity if you are in live box.

I tried to add dialplan and users but it does not save.

Perl beginner – install and run hello world, MySQL test

In Programming on February 22nd, 2010

I am seasoned PHP programmer, been around ten years I am coding on PHP. Although I learn and tried many different programming languages, I always scare to give a try to Perl. I was in impression that Perl is difficult language so never get confident to try it, or never can arrange time for it. But, today as I was working on Asterisk for VoIP system, there’s was no choice left, but Perl.

I gave first try today in Ubuntu. It wasn’t that bad as I heard. Actually I was wrong about Perl, it was proved.

Below is how, I tried first hello world and first database application

Install Perl

  1. $ sudo apt-get install perl

 

Don’t worry, if Perl is already installed, it do nothing. If you have Ubuntu server edition, Perl is already there.

 

Create directory called perl_test. Create perl_test.pl file and save following content.

  1. #!/usr/bin/perl
  2. #simple perl program to print the user input
  3. print ("Hello world! test goes this\n");
  4. $inputline=<stdin>;
  5. print ($inputline);

 

Save file named as perl_test.pl and run following command.

  1. $ sudo chmod +x perl_test.pl
  2. $ ./perl_test.pl

 

Database Test:
Create perl_db.pl file and save following content.

  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use DBI;
  5.  
  6. my $username='test';
  7. my $pass='test';
  8. my $db='test';
  9. my $dbh = DBI->connect( "dbi:mysql:$db", $username, $pass, { 'PrintError' => 1, 'RaiseError' => 1 } );
  10. my $sql='select * from test';
  11. my $sql_handle=$dbh->prepare($sql);
  12. $sql_handle->execute();
  13. my @data;
  14. while (@data=$sql_handle->fetchrow_array()) {
  15. print join("\n",@data)
  16. }

 

  1. $ sudo chmod +x perl_db.pl
  2. $ sudo ./perl_db.pl

 

Make sure user test with password test and database test exits. And it has test table.

 
Haurry!!!