mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 15:34:39 -04:00
Support updating client with buy now link
This commit is contained in:
parent
88bed420b1
commit
dac110e7e0
@ -311,25 +311,23 @@ class OnlinePaymentController extends BaseController
|
|||||||
$query->where('contact_key', $contactKey);
|
$query->where('contact_key', $contactKey);
|
||||||
})->first();
|
})->first();
|
||||||
}
|
}
|
||||||
if (! $client) {
|
$rules = [
|
||||||
$rules = [
|
'first_name' => 'string|max:100',
|
||||||
'first_name' => 'string|max:100',
|
'last_name' => 'string|max:100',
|
||||||
'last_name' => 'string|max:100',
|
'email' => 'email|string|max:100',
|
||||||
'email' => 'email|string|max:100',
|
];
|
||||||
];
|
|
||||||
|
|
||||||
$validator = Validator::make(Input::all(), $rules);
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return redirect()->to("{$failureUrl}/?error=" . $validator->errors()->first());
|
return redirect()->to("{$failureUrl}/?error=" . $validator->errors()->first());
|
||||||
}
|
|
||||||
|
|
||||||
$data = [
|
|
||||||
'currency_id' => $account->currency_id,
|
|
||||||
'contact' => Input::all(),
|
|
||||||
];
|
|
||||||
$client = $clientRepo->save($data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'currency_id' => $account->currency_id,
|
||||||
|
'contact' => Input::all(),
|
||||||
|
];
|
||||||
|
$client = $clientRepo->save($data, $client);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'is_public' => true,
|
'is_public' => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user