Fix for buy now clients
This commit is contained in:
parent
57ae09c4c2
commit
653fb6357a
1 changed files with 16 additions and 14 deletions
|
|
@ -311,23 +311,25 @@ class OnlinePaymentController extends BaseController
|
|||
$query->where('contact_key', $contactKey);
|
||||
})->first();
|
||||
}
|
||||
$rules = [
|
||||
'first_name' => 'string|max:100',
|
||||
'last_name' => 'string|max:100',
|
||||
'email' => 'email|string|max:100',
|
||||
];
|
||||
if (! $client) {
|
||||
$rules = [
|
||||
'first_name' => 'string|max:100',
|
||||
'last_name' => 'string|max:100',
|
||||
'email' => 'email|string|max:100',
|
||||
];
|
||||
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->to("{$failureUrl}/?error=" . $validator->errors()->first());
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return redirect()->to("{$failureUrl}/?error=" . $validator->errors()->first());
|
||||
}
|
||||
|
||||
$data = [
|
||||
'currency_id' => $account->currency_id,
|
||||
'contact' => Input::all(),
|
||||
];
|
||||
$client = $clientRepo->save($data, $client);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'currency_id' => $account->currency_id,
|
||||
'contact' => Input::all(),
|
||||
];
|
||||
$client = $clientRepo->save($data, $client);
|
||||
|
||||
$data = [
|
||||
'client_id' => $client->id,
|
||||
'is_public' => true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue