Example Code: PHP

Below is sample PHP Code.

Please ensure you replace your credentials before performing a query:

<html>

<head>

<title>SOAP client for CONTEGO API</title>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<style type="text/css">

body { font-family: Tahoma; }

        .form { border:10px solid #eee; padding:10px; width:450px; margin:0px auto; }

        .tb { width:380px; border-collapse:collapse; margin:10px auto; }

        .tb td { width: 50%; padding:5px; border:0px solid #eee; font-size:14px; color:#333; }

        .tb td.f { text-align:right; }

        .tb td input { width:250px; padding:2px; color:#333; }

        .tb input.submit { width:60px; }

        .btn { margin:0px auto; text-align:center; }

    </style>

</head>

<body>

<?php if ($_POST['submit'] == null) { ?>

<form method="post" name="form1" id="Form1" class="form">

<table class="tb">

<tr>

<td class="f">Organisation UID:</td>

<td><input type="text" name="o_uid" value="abe54efc-5d68-47f0-9baf-e5c18418f561" /></td>

</tr>

<tr>

<td class="f">Profile UID:</td>

<td><input type="text" name="p_uid" value="b6177ac6-f2ca-40c5-9b16-119c00808edb" /></td>

</tr>

<tr>

<td class="f">MD5signature:</td>

<td><input type="text" name="md5" value="7aff630fa8b3a4ca0ed2c3bc7b3b205c" /></td>

</tr> 

<tr>

<td colspan="2"><div class="btn"><input type="submit" class="submit" value="GO" name="submit" id="Submit1" /></div></td>

</tr>       

</table>

</form>

<? } else { ?>

<p style="text-align:center; font-size:14px;">Click <a href="/">here</a> to send new request.</p>

<hr />

<?php 

$client = new SoapClient("http://qa.contego.com/wsdl/v1/contegoRequesterV1.wsdl");

$check_person_data = array(

'Person' => array(

'Forename' => 'Owen',

'Surname' => 'Aston',

'Middlename' => 'J',

'Gender' => 'M',

'DOB' => '10/10/1971'

)

);

$check_company_data = array(

'Company' => array(

'CompanyName' => 'Contego Fraud Solutions Ltd'

)

);

$request_params_person = array(

'Credentials' => array(

'OrganisationUID' => $_POST['o_uid'],

'ProfileUID' => $_POST['p_uid'],

'MD5signature' => $_POST['md5']

),

'CheckPerson' => $check_person_data

);

$request_params_company = array(

'Credentials' => array(

'OrganisationUID' => $_POST['o_uid'],

'ProfileUID' => $_POST['p_uid'],

'MD5signature' => $_POST['md5']

),

'CheckCompany' => $check_company_data

);

try {

$response = $client->Contego($request_params_company);

print_r($response);

}

catch (Exception $e){

  echo $e->getMessage();

}

?>

<?php } ?>

</body>

</html>

Feedback and Knowledge Base