PHP CodeExample PDF
PHP CodeExample PDF
/*********************************************************
* This is sample code For Bridge Platform API usage
********************************************************/
<?php
//Generate Signature
$hashData = $password . '|' . $timestamp . '|' . $nonsense;
$secureHash = strtoupper(hash('sha512', $hashData));
//POST Url
$url = 'https://authbridge.info/client_api_demo/AuthApi/post_data';
//Initiate curl and call the api with headers and post data
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $arrHeaders);
curl_setopt($ch, CURLOPT_POSTFIELDS, $caseDetailsJson);
$data = curl_exec($ch);
curl_close($ch);
//Get Response in json format
echo $data;
?>
*****************************************************************************
RESPONES DETAILS:
*****************************************************************************
Success Response:
{"status":"success","code":"200","uniqueId":"AK9954647","requestId":"4466","m
sg":"Data Uploaded
Successfully","instantResponse":{"status":"success","code":"200","response":{
"checks":[{"checkUID":"1","type":"45","severity":"Clear","disposition":"The
PAN Number provided matched with the records and was in the subjects
name","status":"Completed","comments":"Exact match found"}]}}}
Failed Response: