Remove customer address and city required in Cinetpay payOut

This commit is contained in:
Djery-Tom 2023-06-29 10:08:08 +01:00
parent 8aa95391a9
commit 4e27fcde57
1 changed files with 3 additions and 2 deletions

View File

@ -180,8 +180,8 @@ class CinetpayController extends Controller
'customer_name' => 'nullable|string',
'customer_surname' => 'required|string',
'customer_phone_number' => ['nullable','string',(new Phone())->country(['CI','SN','ML','CM','TG','BF','CD','GN','BJ'])],
'customer_address' => 'required|string',
'customer_city' => 'required|string',
'customer_address' => 'nullable|string',
'customer_city' => 'nullable|string',
'customer_country' => 'required|string|size:2|in:CI,SN,ML,CM,TG,BF,CD,GN,BJ',
'reason' => 'required|string'
]);
@ -194,6 +194,7 @@ class CinetpayController extends Controller
$phoneNumber = str_replace(' ','',$request->input('customer_phone_number'));
$phone = new PhoneNumber($phoneNumber, $country_code);
$phoneNumber = str_replace(' ','',$phone->formatInternational());
$nationalPhone = str_replace(' ','',$phone->formatNational());
$phonePrefix = substr($phoneNumber, 1, strlen($phoneNumber) - strlen($nationalPhone) - 1);