updated
This commit is contained in:
@@ -78,23 +78,23 @@ class CustomAuthController extends Controller
|
||||
$post['captcha'] = $this->captchaCheck();
|
||||
|
||||
$validator = Validator::make(
|
||||
$post,
|
||||
[
|
||||
'username' => 'unique:user_logins',
|
||||
'email' => 'unique:user_logins',
|
||||
'g-recaptcha-response' => 'required',
|
||||
'captcha' => 'required|min:1'
|
||||
],
|
||||
[
|
||||
'g-recaptcha-response.required' => 'Captcha is required',
|
||||
'captcha.min' => 'Wrong captcha, please try again.'
|
||||
]
|
||||
|
||||
// $post,
|
||||
// [
|
||||
// 'username' => 'unique:user_logins',
|
||||
// 'email' => 'unique:user_logins',
|
||||
// 'g-recaptcha-response' => 'required',
|
||||
// 'captcha' => 'required|min:1'
|
||||
// ],
|
||||
// [
|
||||
// 'g-recaptcha-response.required' => 'Captcha is required',
|
||||
// 'captcha.min' => 'Wrong captcha, please try again.'
|
||||
// ]
|
||||
|
||||
$post,
|
||||
[
|
||||
'username' => 'unique:user_logins',
|
||||
'email' => 'unique:user_logins',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -123,20 +123,36 @@ class CustomAuthController extends Controller
|
||||
));
|
||||
}
|
||||
|
||||
// var_dump($post);
|
||||
|
||||
$user = User::create([
|
||||
'name' => $post['name'],
|
||||
'username' => $post['username'],
|
||||
'name' => $post['firstname'] . ' ' . $post['lastname'],
|
||||
'username' => $post['email'],
|
||||
'email' => $post['email'],
|
||||
'password' => bcrypt($post['password']),
|
||||
'role' => 'user'
|
||||
]);
|
||||
|
||||
$country = explode("_", $post['country']);
|
||||
// $country = explode("_", $post['country']);
|
||||
|
||||
// $data = array(
|
||||
// 'UserId' => $user->id,
|
||||
// 'CountryCode' => $country[0],
|
||||
// 'Country' => $country[1]
|
||||
// );
|
||||
|
||||
$data = array(
|
||||
'UserId' => $user->id,
|
||||
'CountryCode' => $country[0],
|
||||
'Country' => $country[1]
|
||||
'Fullname' => $post['firstname'] . ' ' . $post['lastname'],
|
||||
'ContactNumber' => $post['mobilenumber'],
|
||||
// 'OtherNotes' => $post['othernotes'],
|
||||
'Address' => $post['address'],
|
||||
'Address2' => $post['address2'],
|
||||
'State' => $post['state'],
|
||||
'City' => $post['city'],
|
||||
'ZipCode' => $post['zipcode'],
|
||||
'CountryCode' => $post['countryCode'],
|
||||
'Country' => $post['country']
|
||||
);
|
||||
$userModel->insertAddressBook($data);
|
||||
Auth::attempt(['email' => $post['email'], 'password' => $post['password']]);
|
||||
|
||||
@@ -201,6 +201,7 @@ class PaypalController extends Controller
|
||||
$shipping = PayPal::ShippingAddress();
|
||||
$shipping->setRecipientName($array_address_book[0]->Fullname);
|
||||
$shipping->setLine1($array_address_book[0]->Address);
|
||||
$shipping->setLine2($array_address_book[0]->Address2);
|
||||
$shipping->setCity($array_address_book[0]->City);
|
||||
$shipping->setCountryCode($array_address_book[0]->CountryCode);
|
||||
$shipping->setPostalCode($array_address_book[0]->ZipCode);
|
||||
|
||||
@@ -79,6 +79,7 @@ class UserController extends Controller {
|
||||
'ContactNumber' => $post['mobilenumber'],
|
||||
'OtherNotes' => $post['othernotes'],
|
||||
'Address' => $post['address'],
|
||||
'Address2' => $post['address2'],
|
||||
'State' => $post['state'],
|
||||
'City' => $post['city'],
|
||||
'ZipCode' => $post['zipcode'],
|
||||
@@ -118,6 +119,7 @@ class UserController extends Controller {
|
||||
'ContactNumber' => $post['mobilenumber'],
|
||||
'OtherNotes' => $post['othernotes'],
|
||||
'Address' => $post['address'],
|
||||
'Address2' => $post['address2'],
|
||||
'State' => $post['state'],
|
||||
'City' => $post['city'],
|
||||
'ZipCode' => $post['zipcode'],
|
||||
|
||||
Reference in New Issue
Block a user