Skip to content

Instantly share code, notes, and snippets.

@arif98741
Last active October 26, 2022 10:06
Show Gist options
  • Save arif98741/05b1c43e16c7ddadda38b474617bccd5 to your computer and use it in GitHub Desktop.
Save arif98741/05b1c43e16c7ddadda38b474617bccd5 to your computer and use it in GitHub Desktop.
data
//ekpay old code
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://dev.ekpay.gov.bd/syndicate/api/fetch-MDMbillers',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"hdrs": {
"nm": "FETCH_MDM_DATA_REQ",
"ver": "v1.3.0",
"tms": "2020-02-11T20:19:41+06:00",
"nd_id": "NS4381"
},
"trx": {
"trx_id": "9ENSVVR4Q1UGPY7JGUV444PL9T2C5QX",
"trx_tms": "2018-01-11T20:19:41+06:00"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdoIjoiUk9MRV9VU0VSIiwic3luZGljYXRlX2lkIjoiczQzOCIsInZlcnNpb25faWQiOiIxLjMuMSIsImV4cCI6MTU4NTQ5NzA4NX0.aWZHhY93TOFnbiY4EHP93aw3u_tsz7ZukMjvgrqn6n8IlsffdQAhCbBOOT7_7BukFwTrvm7M6Pc9SKFzo-NkRg'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment