30 lines
853 B
PHP
30 lines
853 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Http;
|
|
|
|
class FetchCardHistoryController extends Controller
|
|
{
|
|
public function index(Request $request)
|
|
{
|
|
$request->validate([
|
|
'passport_serie' => ['required', 'string', 'max:255'],
|
|
'passport_id' => ['required', 'string', 'max:255'],
|
|
'card_number' => ['required', 'string', 'max:255'],
|
|
'card_expiry_date' => ['required', 'string', 'max:255'],
|
|
]);
|
|
|
|
$response = Http::withBody('{
|
|
"idSeria": "I-AS",
|
|
"idNo": "314567",
|
|
"cardMaskNumber":"993403******3258",
|
|
"expDate": "07/49"
|
|
"clientType":"recipient",
|
|
}')->acceptJson()->post('http://10.3.158.102:9999/api/clientinfo');
|
|
|
|
return $response->body();
|
|
}
|
|
}
|