last corrections for payments
This commit is contained in:
parent
044a6bf253
commit
6db007fc82
53 changed files with 1514 additions and 1177 deletions
|
|
@ -8,6 +8,7 @@ use App\Mail\MailCheckout;
|
|||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Services\Util;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
|
|
@ -27,17 +28,18 @@ class PayoneController extends Controller
|
|||
$data = \Request::all();
|
||||
// test para
|
||||
|
||||
/* $data = [
|
||||
/* $data = [
|
||||
'key' => '698fb2555f8b2efc74f60b2121421f45',
|
||||
'txaction' => 'paid',
|
||||
'clearingtype' => 'wlt',
|
||||
'userid' => '158006846',
|
||||
'txid' => '320267294',
|
||||
'price' => '59.00',
|
||||
'param' => '18', //$this->shopping_order->id,
|
||||
'reference' => '15c79ba77992e2',
|
||||
'userid' => '158723953',
|
||||
'txid' => '321623031',
|
||||
'price' => '89.00',
|
||||
'param' => '1', //$this->shopping_order->id,
|
||||
'reference' => '15c83aee2766c3',
|
||||
];
|
||||
*/
|
||||
|
||||
*/
|
||||
|
||||
if(!isset($data['key']) || !isset($data['param']) || !isset($data['userid']) || !isset($data['txid']) || !isset($data['reference']) || !isset($data['price'])){
|
||||
\Log::channel('payone')->error('PaymentStatus: parameter incomplete: '.json_encode($data));
|
||||
|
|
@ -100,7 +102,7 @@ class PayoneController extends Controller
|
|||
'status' => 'PAYONE',
|
||||
'key' => $data['key'],
|
||||
'txaction' => $data['txaction'],
|
||||
'transmitted_data' => $data,
|
||||
'transmitted_data' => Util::utf8ize($data),
|
||||
]);
|
||||
|
||||
$shopping_order->txaction = $data['txaction'];
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use Carbon\Carbon;
|
|||
use Config;
|
||||
use Request;
|
||||
use Input;
|
||||
use Util;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
|
|
@ -55,13 +56,32 @@ class HomeController extends Controller
|
|||
|
||||
$response = "";
|
||||
if($data == "data_protection"){
|
||||
$response = view('legal.data_protect_de')->render();
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.data_protect_de', $data)->render();
|
||||
}
|
||||
if($data == "imprint"){
|
||||
$response = view('legal.imprint_de')->render();
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.imprint_de', $data)->render();
|
||||
}
|
||||
if($data == "shop_term_of_use"){
|
||||
$response = view('legal.shop_term_of_use_de')->render();
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.shop_term_of_use_de', $data)->render();
|
||||
}
|
||||
if($data == "agb"){
|
||||
$data = [
|
||||
'modal' => true,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
$response = view('legal.agb_de', $data)->render();
|
||||
}
|
||||
if(Request::ajax()) {
|
||||
return response()->json(['response' => $response, 'target'=>$target]);
|
||||
|
|
@ -114,13 +134,31 @@ class HomeController extends Controller
|
|||
|
||||
public function legalDataProtected()
|
||||
{
|
||||
return view('legal.data_protected');
|
||||
$data = [
|
||||
'modal' => false,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
return view('legal.data_protected', $data);
|
||||
}
|
||||
|
||||
public function legalAGB()
|
||||
{
|
||||
$data = [
|
||||
'modal' => false,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
return view('legal.agb', $data);
|
||||
}
|
||||
|
||||
public function legalImprint()
|
||||
{
|
||||
return view('legal.imprint');
|
||||
$data = [
|
||||
'modal' => false,
|
||||
'user_shop' => Util::getUserShop(),
|
||||
];
|
||||
return view('legal.imprint', $data);
|
||||
}
|
||||
|
||||
public function verify($confirmation_code){
|
||||
if( ! $confirmation_code)
|
||||
{
|
||||
|
|
@ -136,12 +174,11 @@ class HomeController extends Controller
|
|||
return redirect('/home');
|
||||
|
||||
}
|
||||
|
||||
$user->confirmed = 1;
|
||||
$user->confirmation_date = now();
|
||||
$user->confirmation_code = null;
|
||||
$user->confirmation_code_to = null;
|
||||
$user->confirmation_code_remider = 0;
|
||||
// $user->confirmation_code = null;
|
||||
// $user->confirmation_code_to = null;
|
||||
// $user->confirmation_code_remider = 0;
|
||||
$user->save();
|
||||
|
||||
//Login!
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class TranslationController extends Controller
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->directory_separator = DIRECTORY_SEPARATOR;
|
||||
$this->languagesPath = App::langPath();
|
||||
|
||||
|
|
@ -61,6 +62,7 @@ class TranslationController extends Controller
|
|||
public function update($language)
|
||||
{
|
||||
|
||||
|
||||
$path = $this->resourcePath($this->languagesPath);
|
||||
$file = $path.$language.".json";
|
||||
$data = Input::all();
|
||||
|
|
|
|||
|
|
@ -55,12 +55,12 @@ class TranslationFileController extends Controller
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->directory_separator = DIRECTORY_SEPARATOR;
|
||||
$this->translator = App::make('translator');
|
||||
$this->loader = Lang::getLoader();
|
||||
$this->languagesPath = App::langPath();
|
||||
$this->directory_separator = DIRECTORY_SEPARATOR;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -271,8 +271,14 @@ class UserShopController extends Controller
|
|||
|
||||
if(Input::get('shop_submit') == 'check'){
|
||||
$rules = array(
|
||||
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|',
|
||||
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
if(in_array($value, config('profanity.full_word_check'))){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
|
@ -286,8 +292,14 @@ class UserShopController extends Controller
|
|||
if(Input::get('shop_submit') == 'action') {
|
||||
|
||||
$rules = array(
|
||||
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|',
|
||||
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
if(in_array($value, config('profanity.full_word_check'))){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
|
@ -334,6 +346,8 @@ class UserShopController extends Controller
|
|||
|
||||
$kas = new KasController();
|
||||
$domain = 'mivita.care';
|
||||
|
||||
|
||||
//check if exisist
|
||||
$subdomains = $kas->action('get_subdomains');
|
||||
foreach ($subdomains as $subdomain){
|
||||
|
|
@ -366,8 +380,15 @@ class UserShopController extends Controller
|
|||
public function checkUserShopName(){
|
||||
|
||||
$rules = array(
|
||||
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|',
|
||||
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|full_word_check',
|
||||
);
|
||||
Validator::extend('full_word_check', function ($attribute, $value, $parameters, $validator) {
|
||||
if(in_array($value, config('profanity.full_word_check'))){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
|
|
|||
|
|
@ -67,10 +67,11 @@ class ContactController extends Controller
|
|||
$contact['subject'] = Input::get('subject');
|
||||
$contact['message'] = Input::get('message');
|
||||
|
||||
$checkout_mail = config('app.checkout_mail');
|
||||
if($user_shop){
|
||||
Mail::to($contact['email'])->bcc([$user_shop->user->email, 'k.adametz@kagado.de'])->send(new MailContact($contact));
|
||||
Mail::to($contact['email'])->bcc([$user_shop->user->email, $checkout_mail])->send(new MailContact($contact));
|
||||
}else{
|
||||
Mail::to($contact['email'])->bcc('k.adametz@kagado.de')->send(new MailContact($contact));
|
||||
Mail::to($contact['email'])->bcc($checkout_mail)->send(new MailContact($contact));
|
||||
}
|
||||
|
||||
$data = [
|
||||
|
|
|
|||
|
|
@ -90,6 +90,10 @@ class WizardController extends Controller
|
|||
|
||||
if($user->isPasswort()){
|
||||
$user->wizard = 2;
|
||||
//has Passwort -> delete Code!
|
||||
$user->confirmation_code = null;
|
||||
$user->confirmation_code_to = null;
|
||||
$user->confirmation_code_remider = 0;
|
||||
$user->save();
|
||||
return redirect(route('wizard', [2]));
|
||||
}
|
||||
|
|
@ -108,6 +112,10 @@ class WizardController extends Controller
|
|||
'password' => Hash::make(Input::get('password'))
|
||||
])->save();
|
||||
$user->wizard = 2;
|
||||
//has Passwort -> delete Code!
|
||||
$user->confirmation_code = null;
|
||||
$user->confirmation_code_to = null;
|
||||
$user->confirmation_code_remider = 0;
|
||||
$user->save();
|
||||
return redirect(route('wizard', [2]));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue