This commit is contained in:
2024-10-01 23:11:03 +05:00
parent 87a1c2764d
commit 7095880f7a
6 changed files with 51 additions and 32 deletions

View File

@@ -3,7 +3,6 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
class FetchCardHistoryController extends Controller
{
@@ -16,14 +15,34 @@ class FetchCardHistoryController extends Controller
'card_expiry_date' => ['required', 'string', 'max:255'],
]);
$response = Http::withBody('{
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'http://10.3.158.102:9999/api/clientinfo',
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 => '{
"idSeria": "I-AS",
"idNo": "314567",
"cardMaskNumber":"993403******3258",
"clientType": "recipient",
"cardMaskNumber": "993403******3258",
"expDate": "07/49"
"clientType":"recipient",
}')->acceptJson()->post('http://10.3.158.102:9999/api/clientinfo');
}',
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Content-Type: application/json',
],
]);
return $response->body();
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
}