Custom Price / Land / User Order Homeparty
This commit is contained in:
parent
d46824a4ac
commit
51d81d8ec6
55 changed files with 1951 additions and 681 deletions
|
|
@ -23,15 +23,12 @@ class UserRepository extends BaseRepository {
|
|||
{
|
||||
|
||||
if($data['user_id'] === "new" || $data['user_id'] == 0){
|
||||
|
||||
$this->model = User::create([
|
||||
'email' => $data['email'],
|
||||
'password' => env('APP_KEY'),
|
||||
]);
|
||||
$this->model->payment_methods = PaymentMethod::getDefaultAsArray();
|
||||
$this->model->save();
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$this->model = $this->getById($data['user_id']);
|
||||
|
|
@ -44,8 +41,6 @@ class UserRepository extends BaseRepository {
|
|||
}
|
||||
|
||||
$data['same_as_billing'] = !isset($data['same_as_billing']) ? 0 : 1;
|
||||
|
||||
|
||||
$account->fill($data)->save();
|
||||
|
||||
if(!$this->model->account_id){
|
||||
|
|
@ -139,6 +134,7 @@ class UserRepository extends BaseRepository {
|
|||
if($result->valid == true) {
|
||||
$user->account->tax_identification_number = $data['tax_identification_number'];
|
||||
$user->account->reverse_charge = 1;
|
||||
$user->account->reverse_charge_code = $countryCode;
|
||||
$user->account->reverse_charge_valid = now();
|
||||
$user->account->save();
|
||||
return 'valid';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue