Unified Software
DEVELOPERS

Overview
How BankVal Works
Technical Details

Cookbook

.NET
VB 5/6
VBA
Java
Perl
PHP
Javascript
SAP

Service Information
F.A.Q.s

 

Free Trial Register now for a free 30 day (or 300 hits) trial of BankVal.
<< Click Here >>

<< Why register? >>
 PHP

1. PHP SOAP Client PEAR SOAP Example
2. PHP WSDL Client nuSOAP
3. PHP WSDL Client PEAR SOAP

1. PHP SOAP Client PEAR SOAP Example

This example access the service directly using its SOAP interface, i.e. without generating the proxy code from wsdl.

1) Requires PEAR::SOAP. This package is available from Pear http://pear.php.net/.

2) If curl_exec timeout problems encountered, increase timeout parameter in http.php.

3) Insert the code below into your php script, populating the variables $userid, $PIN, $sortcode and $account as appropriate.

4) Note use of https in url. If you use http instead, bankval will return the message 'Insecure Connection'.


require_once 'SOAP/Client.php';

$client = new SOAP_Client
('https://www.unifiedsoftware.co.uk/cgi-bin/bankvalSOAP.cgi');
$paramstring = $userid . "|" . $PIN . "|" . $sortcode . "|"
. $account; $params = array('params'=> $paramstring);
$result = $client->
call('bankvalidate',$params, array('namespace'=>'urn:BankValSOAP'));

if (PEAR::isError($result))
print("Error: " . $result->getMessage() . "\n");

print_r ($result);


<< back to top >>

2. PHP WSDL Client nuSOAP

1) Requires nuSOAP. nuSOAP is available from http://dietrich.ganx4.com/nusoap/index.php

2) WSDL ensures that SSL (https) is used for the SOAP call.

3) Insert the code below into your php script. Note that parameter string must be passed as an array.

4) 'require' path is implementation dependent.


require '~inc/nusoap.php';

$userid = trim($_POST['userid']);
$PIN = trim($_POST['PIN']);
$sortcode = trim($_POST['sortcode']);
$account = trim($_POST['account']);
$result = NULL;

$client = new soapclient('http://www.unifiedsoftware.co.uk/BankVal.wsdl', true);

$err = $client->getError();

if ($err)
{
echo 'Constructor error' . $err;
}

$paramstring = $userid . "|" . $PIN" . "|" . $sortcode . "|" . $account;
$params = array((string) $paramstring);
$result = $client->call('bankvalidate', $params);
$err = $client->getError();

if ($err)
{
echo 'Error' . $err;
}

print_r ($result);


<< back to top >>

3. PHP WSDL Client PEAR SOAP

1) Requires PEAR::SOAP. This package is available from Pear http://pear.php.net/.

2) If curl_exec timeout problems encountered, increase timeout parameter in http.php

3) WSDL ensures that SSL (https) is used for the SOAP call.

4) Insert the code below into your php script, populating the variables $userid, $PIN, $sortcode and $account as appropriate.


require_once 'SOAP/Client.php';

$wsdl = new SOAP_WSDL("http://www.unifiedsoftware.co.uk/BankVal.wsdl");
$client = $wsdl->getProxy();
$params = $userid . "|" . $PIN . "|" . $sortcode . "|" . $account;
$result = $client->bankvalidate($params);

if (PEAR::isError($result))
print("Error: " . $result->getMessage() . "\n");

print_r ($result);


<< back to top >>
©2003 - 2007 UNIFIED SOFTWARE LIMITED - ALL RIGHTS RESERVED
The BIC information is published with permission of SWIFT SCRL. Database Rights Reserved. 2007.
Unified Software Limited is a VOCA Authorised ISCD Distributor.