Unified Software
t: +44 (0)191 305 5035  e: info@unifiedsoftware.co.uk 

Developers Cookbook

Free Trial

Register now for a free 30 day (or 300 hits) trial of BankVal.

Perl

A. BankVal International
B. BankVal UK

BankVal International ®

A To access BankVal International methods from Perl, the simplest technique is to use the SOAP::Lite toolkit and the service definition file (WSDL). The following examples show how to do this for both BankVal International methods.

A call to the backup services is included in case a problem is encountered.

swiftvalidate

use SOAP::Lite;
...

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValinternationalall.wsdl')
-> swiftvalidate('userid|PIN|SWIFTBIC');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValinternationalall.wsdl')
-> swiftvalidate('userid|PIN|SWIFTBIC');
}

ibanvalidate

use SOAP::Lite;
...

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValinternationalall.wsdl')
-> ibanvalidate('userid|PIN|IBAN');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValinternationalall.wsdl')
-> ibanvalidate('userid|PIN|IBAN');
}

back to top

BankVal UK®

B To access BankVal UK methods from Perl, the simplest technique is to use the SOAP::Lite toolkit and the service definition file (WSDL). The following examples show how to do this for all BankVal UK methods. A call to the backup services is included in case a problem is encountered.

bankvalidate

use SOAP::Lite;
..

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValukall2.wsdl')
-> bankvalidate('userid|PIN|sortcode|account');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValukall2.wsdl')
-> bankvalidate('userid|PIN|sortcode|account');
}

bankvalplus2

use SOAP::Lite;
..

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValukall2.wsdl')
-> bankvalplus2('userid|PIN|sortcode|account');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValukall2.wsdl')
-> bankvalplus2('userid|PIN|sortcode|account');
}

getbranchdetails2

use SOAP::Lite;
..

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValukall2.wsdl')
-> getbranchdetails2('userid|PIN|sortcode');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValukall2.wsdl')
-> getbranchdetails2('userid|PIN|sortcode');
} 

cardvalidate

use SOAP::Lite;
..

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValukall2.wsdl')
-> cardvalidate('userid|PIN|cardnumber');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValukall2.wsdl')
-> cardvalidate('userid|PIN|cardnumber');
}

transpose

use SOAP::Lite;
..

eval {
$result = SOAP::Lite
-> service('http://www.unifiedsoftware.co.uk/BankValukall2.wsdl')
-> transpose('userid|PIN|sortcode|account');
};

if ($@)
{
$result = SOAP::Lite
-> service('http://www.unifiedservices.co.uk/BankValukall2.wsdl')
-> transpose('userid|PIN|sortcode|account');
}

back to top

Our customers