Payone, Shop, wizard
This commit is contained in:
parent
446bc4561b
commit
044a6bf253
28 changed files with 996 additions and 814 deletions
8
.env
8
.env
|
|
@ -8,8 +8,8 @@ APP_PROTOCOL=http://
|
|||
APP_URL_MAIN=
|
||||
APP_URL_CHECKOUT=checkout.
|
||||
#APP_URL_MAIN=dev.
|
||||
APP_URL_CRM=mein.
|
||||
APP_CHECKOUT_MAIL=k.adametz@kagado.de
|
||||
APP_URL_CRM=my.
|
||||
APP_CHECKOUT_MAIL=no-replay@mivita.care
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
|
|
@ -41,8 +41,8 @@ REDIS_PORT=6379
|
|||
MAIL_DRIVER=smtp
|
||||
MAIL_HOST=w017f6e4.kasserver.com
|
||||
MAIL_PORT=587
|
||||
MAIL_USERNAME=m04804ba
|
||||
MAIL_PASSWORD=4xyFrgy5y98ZhpAr
|
||||
MAIL_USERNAME=m04a9fbc
|
||||
MAIL_PASSWORD=3tQ72oCHZgncCTpK
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
|
||||
|
|
|
|||
1024
.idea/workspace.xml
generated
1024
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load diff
111
KasController.php
Normal file
111
KasController.php
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Input;
|
||||
use Session;
|
||||
use \SoapClient;
|
||||
|
||||
class KasController extends Controller
|
||||
{
|
||||
|
||||
|
||||
// Logindaten
|
||||
private $kas_user = 'w017f6e4'; // KAS-Logon
|
||||
private $kas_pass = '7mMJUF4YSVWNpp39'; // KAS-Passwort
|
||||
private $session_lifetime = 600; // Gültigkeit des Tokens in Sek. bis zur neuen Authentifizierung
|
||||
private $session_update_lifetime = 'Y'; // bei N läuft die Session nach <$session_lifetime> Sekunden ab, bei Y verlängert sich die Session mit jeder Benutzung
|
||||
private $CredentialToken = false;
|
||||
private $kas_flood_delay = 2;
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->login();
|
||||
}
|
||||
|
||||
|
||||
public function action($func, $para = array()){
|
||||
|
||||
$this->checkSession($func);
|
||||
try
|
||||
{
|
||||
$Params = array(); // Parameter für die API-Funktion
|
||||
$SoapRequest = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
|
||||
$req = $SoapRequest->KasApi(json_encode(array(
|
||||
'KasUser' => $this->kas_user, // KAS-User
|
||||
'KasAuthType' => 'session', // Auth per Sessiontoken
|
||||
'KasAuthData' => $this->CredentialToken, // Auth-Token
|
||||
'KasRequestType' => $func, // API-Funktion
|
||||
'KasRequestParams' => $para // Parameter an die API-Funktion
|
||||
)));
|
||||
Session::put('flood_protection.'.$func, time() + $this->kas_flood_delay + 0.2);
|
||||
|
||||
if(isset($req['Response']['ReturnString']) && $req['Response']['ReturnString'] == "TRUE"){
|
||||
return $req['Response']['ReturnInfo'];
|
||||
}
|
||||
return $req;
|
||||
}
|
||||
|
||||
// Fehler abfangen und ausgeben
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
trigger_error(" Fehlernummer: {$fault->faultcode},
|
||||
Fehlermeldung: {$fault->faultstring},
|
||||
Verursacher: {$fault->faultactor},
|
||||
Details: {$fault->detail}", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function login(){
|
||||
|
||||
$this->checkSession('auth');
|
||||
try
|
||||
{
|
||||
|
||||
$SoapLogon = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl');
|
||||
$this->CredentialToken = $SoapLogon->KasAuth(json_encode(array(
|
||||
'KasUser' => $this->kas_user,
|
||||
'KasAuthType' => 'sha1',
|
||||
'KasPassword' => sha1($this->kas_pass),
|
||||
'SessionLifeTime' => $this->session_lifetime,
|
||||
'SessionUpdateLifeTime' => $this->session_update_lifetime
|
||||
)));
|
||||
Session::put('flood_protection.auth', time() + $this->kas_flood_delay + 0.2);
|
||||
|
||||
}
|
||||
|
||||
// Fehler abfangen und ausgeben
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
trigger_error("Fehlernummer: {$fault->faultcode},
|
||||
Fehlermeldung: {$fault->faultstring},
|
||||
Verursacher: {$fault->faultactor},
|
||||
Details: {$fault->detail}", E_USER_ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function checkSession($func)
|
||||
{
|
||||
$name = 'flood_protection.'.$func;
|
||||
|
||||
if(Session::exists($name)){
|
||||
$time_to_wait = (float)Session::get($name) - time();
|
||||
Session::forget($name);
|
||||
}else {
|
||||
$time_to_wait = 0;
|
||||
}
|
||||
if ( $time_to_wait >= 0 ) {
|
||||
usleep( intval( $time_to_wait*1000000 ) );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
161
app/Http/Controllers/Api/PayoneController.php
Executable file
161
app/Http/Controllers/Api/PayoneController.php
Executable file
|
|
@ -0,0 +1,161 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\MailCheckout;
|
||||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
|
||||
class PayoneController extends Controller
|
||||
{
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function paymentStatus(){
|
||||
|
||||
$data = \Request::all();
|
||||
// test para
|
||||
|
||||
/* $data = [
|
||||
'key' => '698fb2555f8b2efc74f60b2121421f45',
|
||||
'txaction' => 'paid',
|
||||
'clearingtype' => 'wlt',
|
||||
'userid' => '158006846',
|
||||
'txid' => '320267294',
|
||||
'price' => '59.00',
|
||||
'param' => '18', //$this->shopping_order->id,
|
||||
'reference' => '15c79ba77992e2',
|
||||
];
|
||||
*/
|
||||
|
||||
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));
|
||||
echo "PaymentStatus: parameter incomplete:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
if($data['key'] != config('payone.defaults.key')) {
|
||||
\Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
|
||||
echo "PaymentStatus: Key error:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
$shopping_order = ShoppingOrder::find($data['param']);
|
||||
if(!$shopping_order){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingOrder not found: '.json_encode($data));
|
||||
echo "PaymentStatus: ShoppingOrder not found:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
$shopping_payment = ShoppingPayment::where('reference', $data['reference'])->first();
|
||||
if(!$shopping_payment){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingPayment not found: '.json_encode($data));
|
||||
echo "PaymentStatus: ShoppingPayment not found:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
if($shopping_payment->shopping_order_id != $shopping_order->id){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingPayment no realation ShoppingOrder: '.json_encode($data));
|
||||
echo "PaymentStatus: ShoppingPayment no realation ShoppingOrder:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
if($data['key'] != config('payone.defaults.key')) {
|
||||
\Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
|
||||
echo "PaymentStatus: ShoppingPayment no realation ShoppingOrder:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
$price = intval($data['price']*100);
|
||||
if($shopping_payment->amount != $price){
|
||||
\Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data));
|
||||
echo "PaymentStatus: Price error:";
|
||||
var_dump($data);
|
||||
die();
|
||||
}
|
||||
|
||||
//create transaction
|
||||
PaymentTransaction::create([
|
||||
'shopping_payment_id' => $shopping_payment->id,
|
||||
'request' => 'transaction',
|
||||
'txid' => $data['txid'],
|
||||
'userid' => $data['userid'],
|
||||
'status' => 'PAYONE',
|
||||
'key' => $data['key'],
|
||||
'txaction' => $data['txaction'],
|
||||
'transmitted_data' => $data,
|
||||
]);
|
||||
|
||||
$shopping_order->txaction = $data['txaction'];
|
||||
$shopping_order->save();
|
||||
$shopping_payment->txaction = $data['txaction'];
|
||||
$shopping_payment->save();
|
||||
|
||||
|
||||
if($data['txaction'] == 'failed'){
|
||||
|
||||
}
|
||||
if($data['txaction'] == 'paid'){
|
||||
$shopping_order->paid = true;
|
||||
$shopping_order->save();
|
||||
//if product has actions
|
||||
if($shopping_order->shopping_order_items && $shopping_order->auth_user_id){
|
||||
foreach($shopping_order->shopping_order_items as $shopping_order_item){
|
||||
if($shopping_order_item->product){
|
||||
if($shopping_order_item->product->action){
|
||||
|
||||
$user = User::findOrFail($shopping_order->auth_user_id);
|
||||
foreach ($shopping_order_item->product->action as $do){
|
||||
if($shopping_order_item->product->getActionName($do) == 'payment_for_account'){
|
||||
$user->payment_account = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||
$user->wizard = 10;
|
||||
}
|
||||
if($shopping_order_item->product->getActionName($do) == 'payment_for_shop'){
|
||||
$user->payment_shop = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||
$user->wizard = 10;
|
||||
}
|
||||
$user->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($data['txaction'] == 'appointed'){
|
||||
|
||||
}
|
||||
$billing_email = $shopping_order->shopping_user->billing_email;
|
||||
$user_shop_email = $shopping_order->user_shop->user->email;
|
||||
if(!$billing_email){
|
||||
$billing_email = config('app.checkout_mail');
|
||||
}
|
||||
$checkout_mail = config('app.checkout_mail');
|
||||
if($user_shop_email){
|
||||
Mail::to($billing_email)->bcc([$user_shop_email, $checkout_mail])->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment));
|
||||
}else{
|
||||
Mail::to($billing_email)->bcc($checkout_mail)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment));
|
||||
}
|
||||
|
||||
print("TSOK");
|
||||
exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -111,40 +111,18 @@ class PayoneController extends Controller
|
|||
return $this->reference;
|
||||
}
|
||||
|
||||
public function setPersonalData($data){
|
||||
|
||||
public function setPersonalData(){
|
||||
$this->personalData = [
|
||||
// "salutation" => "Mr.",
|
||||
// "firstname" => "Henry",
|
||||
"lastname" => "Player", // mandatory
|
||||
// "street" => "Royal Street 1",
|
||||
// "zip" => "24118",
|
||||
// "city" => "Kiel",
|
||||
"country" => "DE", // mandatory
|
||||
//"email" => " info-buyer@mivita.care",
|
||||
"language" => "de"
|
||||
"firstname" => $this->shopping_user->billing_firstname,
|
||||
"lastname" => $this->shopping_user->billing_lastname, // mandatory
|
||||
"street" => $this->shopping_user->billing_address,
|
||||
"zip" => $this->shopping_user->billing_zipcode,
|
||||
"city" => $this->shopping_user->billing_city,
|
||||
"country" => ($this->shopping_user->billing_country) ? $this->shopping_user->billing_country->code : "DE", // mandatory
|
||||
"email" => $this->shopping_user->billing_email,
|
||||
"language" => ($this->shopping_user->billing_country) ? strtolower($this->shopping_user->billing_country->code) : "DE", // mandatory
|
||||
];
|
||||
|
||||
|
||||
/* $this->personalData = array(
|
||||
"salutation" => "Herr",
|
||||
"title" => "Dr.",
|
||||
"firstname" => "Paul",
|
||||
"lastname" => "Neverpayer",
|
||||
"street" => "Fraunhoferstraße 2-4",
|
||||
"addressaddition" => "EG",
|
||||
"zip" => "24118",
|
||||
"city" => "Kiel",
|
||||
"country" => "DE",
|
||||
"email" => "paul.neverpayer@payone.de",
|
||||
"telephonenumber" => "043125968500",
|
||||
"birthday" => "19700204",
|
||||
"language" => "de",
|
||||
"gender" => "m",
|
||||
"ip" => "8.8.8.8"
|
||||
);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Paydirekt requires both, personal data and shipping data
|
||||
*/
|
||||
|
|
@ -157,9 +135,6 @@ class PayoneController extends Controller
|
|||
"shipping_country" => "DE"
|
||||
);*/
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function setMethod($payment_method, $cc_ret = []){
|
||||
|
|
|
|||
|
|
@ -43,23 +43,31 @@ class UserDataController extends Controller
|
|||
/*if(!$user->account){
|
||||
$user->account = new UserAccount();
|
||||
}*/
|
||||
|
||||
$rules = array(
|
||||
'salutation' => 'required',
|
||||
'last_name' => 'required|max:255',
|
||||
'country_id' => 'required|integer|min:1',
|
||||
'first_name'=>'required',
|
||||
'last_name'=>'required',
|
||||
'address'=>'required',
|
||||
'zipcode'=>'required',
|
||||
'city' => 'required',
|
||||
'email' => 'required|string|email|max:255|exists:users,email',
|
||||
'email-confirm' => 'required|same:email',
|
||||
);
|
||||
if(!Input::get('same_as_billing')){
|
||||
$rules = array_merge($rules, [
|
||||
'shipping_firstname'=>'required',
|
||||
'shipping_lastname'=>'required',
|
||||
'shipping_address'=>'required',
|
||||
'shipping_zipcode'=>'required',
|
||||
'shipping_city' => 'required',
|
||||
'shipping_salutation' => 'required'
|
||||
|
||||
if(Input::get('company') == 1){
|
||||
$rules['company_name'] = 'required|max:255';
|
||||
$rules['company_country_id'] = 'required|integer|min:1';
|
||||
]);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'user' => $user,
|
||||
];
|
||||
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use App\Models\UserShop;
|
|||
use App\Models\UserShopOnSite;
|
||||
use App\Repositories\UserRepository;
|
||||
use Auth;
|
||||
use Cviebrock\EloquentSluggable\Services\SlugService;
|
||||
use Input;
|
||||
use Response;
|
||||
use Validator;
|
||||
|
|
@ -370,22 +371,19 @@ class UserShopController extends Controller
|
|||
$validator = Validator::make(Input::all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
$messages = $validator->messages();
|
||||
|
||||
//$messages = $validator->messages();
|
||||
return Response::json(array(
|
||||
'success' => false,
|
||||
'errors' => $validator->getMessageBag()->toArray()
|
||||
|
||||
));
|
||||
}
|
||||
return Response::json(array(
|
||||
'success' => true,
|
||||
));
|
||||
$slug = SlugService::createSlug(UserShop::class, 'slug', Input::get('user_shop_name'));
|
||||
|
||||
return Response::json(array(
|
||||
'success' => true,
|
||||
'preview_user_shop_name' => "http://".$slug.".".config('app.domain'),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -35,6 +35,8 @@ class CardController extends Controller
|
|||
$image = $product->images->first()->slug;
|
||||
}
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
|
||||
\Session()->flash('show-card-after-add', true);
|
||||
}
|
||||
|
||||
|
|
@ -54,6 +56,8 @@ class CardController extends Controller
|
|||
}
|
||||
$quantity = Input::get('quantity') ? Input::get('quantity') : 1;
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
|
||||
\Session()->flash('show-card-after-add', true);
|
||||
}
|
||||
return back();
|
||||
|
|
@ -66,8 +70,7 @@ class CardController extends Controller
|
|||
if(Input::get('selected_country')){
|
||||
Yard::instance('shopping')->setShippingCountryWithPrice(Input::get('selected_country'));
|
||||
}else{
|
||||
// $ShippingCountry = ShippingCountry::where('country_id', 1)->first();
|
||||
// $selected_country = $ShippingCountry->id;
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
}
|
||||
$data = [
|
||||
'user_shop' => Util::getUserShop(),
|
||||
|
|
@ -81,6 +84,7 @@ class CardController extends Controller
|
|||
if(isset($data['quantity'])){
|
||||
foreach ($data['quantity'] as $rowId => $qty){
|
||||
Yard::instance('shopping')->update($rowId, $qty);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
}
|
||||
}else{
|
||||
$this->deleteCard();
|
||||
|
|
|
|||
|
|
@ -5,16 +5,13 @@ namespace App\Http\Controllers\Web;
|
|||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Pay\PayoneController;
|
||||
use App\Mail\MailCheckout;
|
||||
use App\Models\PaymentTransaction;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingOrderItem;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Models\ShoppingUser;
|
||||
use App\User;
|
||||
use Illuminate\Session\SessionManager;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Validator;
|
||||
use App\Services\Util;
|
||||
use Yard;
|
||||
|
|
@ -167,7 +164,7 @@ class CheckoutController extends Controller
|
|||
$amount = intval(floatval(Yard::instance('shopping')->totalWithShipping(2, '.', ',')) *100);
|
||||
$reference = $pay->setPrePayment(Input::get('payment_method'), $amount, 'EUR', $cc_ret);
|
||||
$this->putPayments('payment_reference', $reference);
|
||||
$pay->setPersonalData([]);
|
||||
$pay->setPersonalData();
|
||||
return $pay->ResponseData();
|
||||
}
|
||||
|
||||
|
|
@ -231,127 +228,6 @@ class CheckoutController extends Controller
|
|||
return view('web.templates.checkout-final', $data);
|
||||
}
|
||||
|
||||
public function paymentStatus(){
|
||||
|
||||
$data = \Request::all();
|
||||
|
||||
// test para
|
||||
|
||||
$data = [
|
||||
'key' => '698fb2555f8b2efc74f60b2121421f45',
|
||||
'txaction' => 'paid',
|
||||
'clearingtype' => 'wlt',
|
||||
'userid' => '158006846',
|
||||
'txid' => '320267294',
|
||||
'price' => '59.00',
|
||||
'param' => '18', //$this->shopping_order->id,
|
||||
'reference' => '15c79ba77992e2',
|
||||
];
|
||||
|
||||
|
||||
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));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
if($data['key'] != config('payone.defaults.key')) {
|
||||
\Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$shopping_order = ShoppingOrder::find($data['param']);
|
||||
if(!$shopping_order){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingOrder not found: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$shopping_payment = ShoppingPayment::where('reference', $data['reference'])->first();
|
||||
if(!$shopping_payment){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingPayment not found: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
if($shopping_payment->shopping_order_id != $shopping_order->id){
|
||||
\Log::channel('payone')->error('PaymentStatus: ShoppingPayment no realation ShoppingOrder: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
if($data['key'] != config('payone.defaults.key')) {
|
||||
\Log::channel('payone')->error('PaymentStatus: Key error: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
$price = intval($data['price']*100);
|
||||
if($shopping_payment->amount != $price){
|
||||
\Log::channel('payone')->error('PaymentStatus: Price error: '.json_encode($data));
|
||||
abort(404);
|
||||
}
|
||||
|
||||
//create transaction
|
||||
PaymentTransaction::create([
|
||||
'shopping_payment_id' => $shopping_payment->id,
|
||||
'request' => 'transaction',
|
||||
'txid' => $data['txid'],
|
||||
'userid' => $data['userid'],
|
||||
'status' => 'PAYONE',
|
||||
'key' => $data['key'],
|
||||
'txaction' => $data['txaction'],
|
||||
'transmitted_data' => $data,
|
||||
]);
|
||||
|
||||
$shopping_order->txaction = $data['txaction'];
|
||||
$shopping_order->save();
|
||||
$shopping_payment->txaction = $data['txaction'];
|
||||
$shopping_payment->save();
|
||||
|
||||
|
||||
if($data['txaction'] == 'failed'){
|
||||
|
||||
}
|
||||
if($data['txaction'] == 'paid'){
|
||||
$shopping_order->paid = true;
|
||||
$shopping_order->save();
|
||||
//if product has actions
|
||||
if($shopping_order->shopping_order_items && $shopping_order->auth_user_id){
|
||||
foreach($shopping_order->shopping_order_items as $shopping_order_item){
|
||||
if($shopping_order_item->product){
|
||||
if($shopping_order_item->product->action){
|
||||
|
||||
$user = User::findOrFail($shopping_order->auth_user_id);
|
||||
foreach ($shopping_order_item->product->action as $do){
|
||||
if($shopping_order_item->product->getActionName($do) == 'payment_for_account'){
|
||||
$user->payment_account = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||
$user->wizard = 10;
|
||||
}
|
||||
if($shopping_order_item->product->getActionName($do) == 'payment_for_shop'){
|
||||
$user->payment_shop = date("Y-m-d H:i:s", strtotime("+1 years"));
|
||||
$user->wizard = 10;
|
||||
}
|
||||
$user->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($data['txaction'] == 'appointed'){
|
||||
|
||||
}
|
||||
$billing_email = $shopping_order->shopping_user->billing_email;
|
||||
$user_shop_email = $shopping_order->user_shop->user->email;
|
||||
if(!$billing_email){
|
||||
$billing_email = config('app.checkout_mail');
|
||||
}
|
||||
$checkout_mail = config('app.checkout_mail');
|
||||
if($user_shop_email){
|
||||
Mail::to($billing_email)->bcc([$user_shop_email, $checkout_mail])->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment));
|
||||
}else{
|
||||
Mail::to($billing_email)->bcc($checkout_mail)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment));
|
||||
}
|
||||
die("ok");
|
||||
}
|
||||
|
||||
private function makeShoppingUser($data){
|
||||
|
||||
$data['same_as_billing'] = isset($data['same_as_billing']) ? true : false;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ class SiteController extends Controller
|
|||
return view('web.index', $data);
|
||||
}
|
||||
|
||||
public function domainCheck(){
|
||||
die("checked");
|
||||
}
|
||||
public function site($site, $subsite = false, $product_slug = false)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class WizardController extends Controller
|
|||
|
||||
//add to DB
|
||||
$path = route('checkout.checkout_card', ['identifier'=>$identifier]);
|
||||
$path = str_replace('http', 'https', $path);
|
||||
//$path = str_replace('http', 'https', $path);
|
||||
return redirect()->secure($path);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ class UserShop extends Model
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
$url = "http://".$this->attributes['slug'].".mivita.care/domain/check";
|
||||
if(@file_get_contents($url) != 'checked'){
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,17 @@ class RouteServiceProvider extends ServiceProvider
|
|||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
|
||||
Route::domain('api.'.config('app.domain'))
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
|
||||
//.
|
||||
/* Route::prefix('api')
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,14 @@ class Yard extends Cart
|
|||
}
|
||||
return "";
|
||||
}
|
||||
public function getShippingCountryCountryId()
|
||||
{
|
||||
$shippingCountry = ShippingCountry::find($this->shipping_country_id);
|
||||
if($shippingCountry && $shippingCountry->country){
|
||||
return $shippingCountry->country->id;
|
||||
}
|
||||
return 1; //default DE
|
||||
}
|
||||
|
||||
public function getShippingCountryId()
|
||||
{
|
||||
|
|
@ -86,27 +94,68 @@ class Yard extends Cart
|
|||
return $this->ysession->get($this->yinstance);
|
||||
}
|
||||
|
||||
|
||||
public function reCalculateShippingPrice(){
|
||||
$this->calculateShippingPrice();
|
||||
}
|
||||
|
||||
public function setShippingCountryWithPrice($shipping_country_id)
|
||||
{
|
||||
$this->shipping_country_id = $shipping_country_id;
|
||||
$this->putShippingExtra('shipping_country_id', $shipping_country_id);
|
||||
$this->calculateShippingPrice();
|
||||
|
||||
}
|
||||
|
||||
private function calculateShippingPrice(){
|
||||
|
||||
$shippingCountry = ShippingCountry::find($this->shipping_country_id);
|
||||
$shipping = $shippingCountry->shipping;
|
||||
|
||||
if(intval($this->weight()) == 0){
|
||||
$price = $shipping->prices->first();
|
||||
$price->price = 0;
|
||||
}else{
|
||||
//first by price
|
||||
$price = $this->shippingPriceByTotal($shipping->prices, floatval($this->total(2, '.', ',')));
|
||||
//sec by weight
|
||||
if(!$price){
|
||||
$price = $this->shippingPriceByWeight($shipping->prices, intval($this->weight()));
|
||||
|
||||
if($shipping_country_id > 0){
|
||||
$shippingCountry = ShippingCountry::find($shipping_country_id);
|
||||
$shipping = $shippingCountry->shipping;
|
||||
if($this->weight() == 0){
|
||||
$price = $shipping->prices->first();
|
||||
$price->price = 0;
|
||||
}else{
|
||||
$price = $shipping->prices->first();
|
||||
}
|
||||
if($price){
|
||||
$this->shipping = floatval($price->price);
|
||||
$this->putShippingExtra('shipping_price', $this->shipping);
|
||||
//default
|
||||
if(!$price){
|
||||
$price = $shipping->prices->first();
|
||||
}
|
||||
}
|
||||
if($price){
|
||||
$this->shipping = floatval($price->price);
|
||||
$this->putShippingExtra('shipping_price', $this->shipping);
|
||||
}
|
||||
}
|
||||
|
||||
private function shippingPriceByTotal($prices, $total){
|
||||
foreach ($prices as $price){
|
||||
if($price->total_from > 0 && $price->total_to > 0){
|
||||
if($total >= $price->total_from && $total <= $price->total_to){
|
||||
return $price;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private function shippingPriceByWeight($prices, $weight){
|
||||
foreach ($prices as $price){
|
||||
if($price->weight_from > 0 && $price->weight_to > 0){
|
||||
if($weight >= $price->weight_from && $weight <= $price->weight_to){
|
||||
return $price;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -169,7 +218,7 @@ class Yard extends Cart
|
|||
{
|
||||
$content = $this->getContent();
|
||||
$total = $content->reduce(function ($total, CartItem $cartItem) {
|
||||
return $total + ($cartItem->options->weight ? intval($cartItem->options->weight) : 0);
|
||||
return $total + ($cartItem->options->weight ? intval($cartItem->options->weight*$cartItem->qty) : 0);
|
||||
}, 0);
|
||||
|
||||
return $total;
|
||||
|
|
|
|||
|
|
@ -52,13 +52,13 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'url' => env('APP_URL', 'mivita.local/'),
|
||||
'domain' => env('APP_DOMAIN', 'https://mivita.local'),
|
||||
'url' => env('APP_URL', 'https://mivita.local/'),
|
||||
'domain' => env('APP_DOMAIN', 'mivita.local'),
|
||||
'protocol' => env('APP_PROTOCOL', 'https://'),
|
||||
'pre_url_main' => env('APP_URL_MAIN', ''),
|
||||
'pre_url_crm' => env('APP_URL_CRM', 'mein.'),
|
||||
'pre_url_crm' => env('APP_URL_CRM', 'my.'),
|
||||
'checkout_url' => env('APP_URL_CHECKOUT', 'checkout.'),
|
||||
'checkout_mail' => env('APP_CHECKOUT_MAIL', 'k.adametz@kagado.de'),
|
||||
'checkout_mail' => env('APP_CHECKOUT_MAIL', 'no-replay@mivita.care'),
|
||||
|
||||
|
||||
/* 'url_backend' => env('APP_URL', 'http://mivita.local/'),
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ return [
|
|||
*/
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'support@mivita.care'),
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'checkout@mivita.care'),
|
||||
'name' => env('MAIL_FROM_NAME', 'mivita.care'),
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ return [
|
|||
'whore',
|
||||
'wtf',
|
||||
'mivita',
|
||||
'aloe',
|
||||
'vera',
|
||||
'shop',
|
||||
'myaloe',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,10 +5,21 @@
|
|||
|
||||
RewriteEngine On
|
||||
|
||||
|
||||
|
||||
#RewriteCond %{HTTPS} off
|
||||
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
#RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
|
||||
|
||||
#RewriteCond %{HTTPS} on
|
||||
#RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
#RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
|
|
|
|||
|
|
@ -179,12 +179,12 @@
|
|||
"Choose Your Shop Name" : "Wähle einen einprägsamen Shop-Namen, der zu Dir passt.",
|
||||
"shop_name_error_1":"Dein Shop-Name darf nur lateinische Buchstaben ohne Akzent sowie Ziffern enthalten, keine Leerzeichen.",
|
||||
"shop_name_error_2":"Shop-Namen müssen 4 bis 20 Zeichen lang sein.",
|
||||
"shop_name_description":"Dein Shop-Name wird in Deinem Shop angezeigt. Aus Deinem Shop-Namen wird die InternetAdresse (Domain) erstellt, mit der Dein Shop aufgerufen werden kann. Der Shop Name ist später nicht mehr änderbar.",
|
||||
"shop_name_description":"Dein Shop-Name wird in Deinem Shop angezeigt. Aus Deinem Shop-Namen wird die Internet-Adresse (Domain) erstellt, mit der Dein Shop aufgerufen werden kann. Wähle Deinen Shop-Namen sorgfältig aus, dieser ist später nur gegen eine Gebühr von 50,- Euro änderbar.",
|
||||
"save and continue":"speichern und fortfahren",
|
||||
"shop_title": "Shop Inhaber",
|
||||
"shop_title_help": "Gib Deinen Namen zum Shop an.",
|
||||
"shop_contact": "Shop Kontakt",
|
||||
"shop_contac_help": "Vervollständige Deine Kontaktdaten die im Shop angezeigt werden.",
|
||||
"shop_contact_help": "Vervollständige Deine Kontaktdaten die im Shop angezeigt werden.",
|
||||
"shop_accessibility": "Shop Erreichbarkeit",
|
||||
"shop_accessibility_help": "Gib Deine Erreichbarkeit an.",
|
||||
"shop_about": "Shop persönlicher Text",
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||
<strong>{{__('Shop nicht gebucht')}}</strong></p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -66,16 +66,18 @@
|
|||
<div class="text-muted">{{ __('Status') }}</div>
|
||||
<div class="text-right">
|
||||
@if($user->shop->getSubdomainStatus())
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"> {{ __('available') }} </i> DNS</span>
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"> {{ __('available') }} </i> DNS</span><br>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"> {{ __('not available') }} </i> DNS</span>
|
||||
@endif
|
||||
|
||||
@if($user->shop->getSubdomainAvailable())
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"> {{ __('available') }} </i> HTTP</span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"> {{ __('not available') }} </i> HTTP</span>
|
||||
@endif
|
||||
@if($user->shop->getSubdomainAvailable())
|
||||
<span class="badge badge-pill badge-success"><i class="far fa-check"> {{ __('available') }} </i> HTTP</span>
|
||||
@else
|
||||
<span class="badge badge-pill badge-danger"><i class="far fa-times"> {{ __('not available') }} </i> HTTP</span>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -105,22 +107,18 @@
|
|||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="col-md-4">
|
||||
<div class="card mb-4">
|
||||
@include('user.components.user_shop_image')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card mb-4">
|
||||
@include('user.components.user_shop_on_site')
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="card mb-4">
|
||||
@include('user.components.user_shop_on_site')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- / image files -->
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<div class="text-center">
|
||||
<img class="img-fluid" style="margin: 0 auto;" alt="" src="{{ url($user->shop->getImage()) }}">
|
||||
<br><br>
|
||||
<a href="{{ route('user_shop_delete_image') }}" class="btn btn-primary" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
|
||||
<a href="{{ route('user_shop_delete_image') }}" class="btn btn-danger" onclick="return confirm('Bild wirklich löschen?');"><i class="fa fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
|
|
|
|||
|
|
@ -23,18 +23,18 @@
|
|||
|
||||
<div class="row">
|
||||
@if(count($user->shop->on_sites) <= 5)
|
||||
<div class="col-md-8 col-sm-6">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="row">
|
||||
@foreach($user->shop->on_sites as $image)
|
||||
<div class="col-6 col-md-4 text-center" style="border: 1px solid #eee;">
|
||||
<img class="img-fluid" alt="" src="{{ route('user_shop_image', [$image->slug]) }}">
|
||||
<br>
|
||||
<a href="{{ route('user_shop_on_site_delete_image', [$image->id, $user->shop->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
|
||||
<a href="{{ route('user_shop_on_site_delete_image', [$image->id, $user->shop->id]) }}" class="btn btn-sm btn-danger mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');"><i class="fa fa-trash"></i></a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="{{ route('user_shop_on_site_upload_image') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<div class="col-6 col-md-4 text-center" style="border: 1px solid #eee;">
|
||||
<img class="img-fluid" alt="" src="{{ route('user_shop_image', [$image->slug]) }}">
|
||||
<br>
|
||||
<a href="{{ route('user_shop_on_site_delete_image', [$image->id, $user->shop->id]) }}" class="btn btn-sm btn-primary mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
|
||||
<a href="{{ route('user_shop_on_site_delete_image', [$image->id, $user->shop->id]) }}" class="btn btn-sm btn-danger mt-2 mb-2" onclick="return confirm('Bild wirklich löschen?');"><i class="fa fa-trash"></i></a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -40,9 +40,14 @@
|
|||
</span>
|
||||
@endif
|
||||
<p class="mt-2">{{__('shop_name_description')}}</p>
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
<div class="from-group mt-2 mb-2 ">
|
||||
{{ Form::text('preview_user_shop_name', '', array('placeholder'=>__('Vorschau Shop-Internet Adresse'), 'class'=>'form-control', 'id'=>'preview_user_shop_name', 'readonly')) }}
|
||||
</div>
|
||||
<p class="mt-2">Hier siehtst du eine Vorschau, wie Deine Shop-Internet Adresse lauten wird.</p>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input {{ $errors->has('user_shop_active') ? 'is-invalid' : '' }}" name="user_shop_active" id="user_shop_active" tabindex = "1">
|
||||
|
|
@ -59,7 +64,7 @@
|
|||
</div>
|
||||
<hr>
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary" name="shop_submit" value="action">{{__('save and continue') }}</button>
|
||||
<button type="submit" class="btn btn-secondary" name="shop_submit" value="action">{{__('akzeptieren und weiter') }}</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -111,10 +116,13 @@
|
|||
dataFilter: function(response) {
|
||||
response = $.parseJSON(response);
|
||||
console.log(response);
|
||||
|
||||
if (response.success === true) return true;
|
||||
if (response.success === true){
|
||||
$('#preview_user_shop_name').val(response.preview_user_shop_name);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
message = response.errors.user_shop_name;
|
||||
$('#preview_user_shop_name').val('');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
{!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
|
||||
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
|
||||
@include('user.form')
|
||||
|
||||
@include('user.user_form')
|
||||
<div class="text-left mt-3">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>
|
||||
<a href="{{route('home')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@
|
|||
<select id="billing_state" name="billing_state" class="form-control select2 required" disabled="true">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
|
||||
</select>
|
||||
<input type="hidden" name="billing_country_id" value="{{Yard::instance('shopping')->getShippingCountryId()}}">
|
||||
<input type="hidden" name="billing_country_id" value="{{Yard::instance('shopping')->getShippingCountryCountryId()}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
<select id="shipping_state" name="shipping_state" class="form-control select2 required" disabled="true">
|
||||
{!! HTMLHelper::getCountriesForShipping(Yard::instance('shopping')->getShippingCountryId()) !!}
|
||||
</select>
|
||||
<input type="hidden" name="shipping_country_id" value="{{Yard::instance('shopping')->getShippingCountryId()}}">
|
||||
<input type="hidden" name="shipping_country_id" value="{{Yard::instance('shopping')->getShippingCountryCountryId()}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -391,7 +391,15 @@
|
|||
</fieldset>
|
||||
<!-- /SHIPPING -->
|
||||
|
||||
<a href="{{ Util::getUserShopBackUrl('/card/show') }}" class="btn btn-default btn-sm btn- size-15 mt-4"><i class="fa fa-chevron-left"></i> zurück zum Warenkorb</a>
|
||||
@if(isset($order_reference))
|
||||
<a href="{{ Util::getUserShopBackUrl($order_reference) }}" class="btn btn-default btn-sm btn- size-15 mt-4">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Shop
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ Util::getUserCardBackUrl('/card/show') }}" class="btn btn-default btn-sm btn- size-15 mt-4">
|
||||
<i class="fa fa-chevron-left"></i> zurück zum Warenkorb
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-lg-5 col-sm-5">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,17 @@ use Illuminate\Http\Request;
|
|||
|
|
||||
*/
|
||||
|
||||
Route::middleware('auth:api')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
//Route::post('login', 'API\UserController@login');
|
||||
//Route::post('register', 'API\UserController@register');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Route::get('/payment/status', 'Api\PayoneController@paymentStatus')->name('api.payment_status');
|
||||
Route::post('/payment/status', 'Api\PayoneController@paymentStatus')->name('api.payment_status');
|
||||
Route::group(['middleware' => 'auth:api'], function(){
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ Route::get('/shop/product/image/{slug}', function($slug = null)
|
|||
})->name('shop_product_image');
|
||||
|
||||
|
||||
|
||||
//main site mivita
|
||||
Route::domain(config('app.pre_url_main').config('app.domain'))->group(function () {
|
||||
|
||||
|
|
@ -74,7 +75,7 @@ Route::domain(config('app.pre_url_main').config('app.domain'))->group(function (
|
|||
});
|
||||
|
||||
|
||||
/* ROUTING FOR CRM mein.mivita / CMS*/
|
||||
/* ROUTING FOR CRM my.mivita / CMS*/
|
||||
Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function () {
|
||||
|
||||
Auth::routes();
|
||||
|
|
@ -246,9 +247,6 @@ Route::domain(config('app.pre_url_crm').config('app.domain'))->group(function ()
|
|||
|
||||
Route::domain(config('app.checkout_url').config('app.domain'))->group(function () {
|
||||
|
||||
Route::get('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
||||
Route::post('/payment/status', 'Web\CheckoutController@paymentStatus')->name('checkout.payment_status');
|
||||
|
||||
Route::group(['middleware' => ['checkout']], function() {
|
||||
|
||||
Route::get('/checkout/card/{identifier?}', 'Web\CheckoutController@checkout')->name('checkout.checkout_card');
|
||||
|
|
@ -281,80 +279,9 @@ Route::domain('{subdomain}.'.config('app.domain'))->group(function () {
|
|||
Route::get('/card/remove/{rowId}', 'Web\CardController@removeCard')->name('user.card_remove');
|
||||
Route::get('/card/delete', 'Web\CardController@deleteCard')->name('user.card_delete');
|
||||
Route::get('/back/to/shop/{reference?}', 'Web\CardController@backToShop')->name('user.back_to_shop');
|
||||
Route::get('/domain/check', 'Web\SiteController@domainCheck')->name('user.domain_check');
|
||||
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('user.site');
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
//Route::get('/', 'HomeController@index')->name('/');
|
||||
|
||||
/*Route::post('/register/data', 'HomeController@register')->name('register_data');
|
||||
Route::post('/user/check/mail', 'HomeController@checkMail')->name('user_check_mail');
|
||||
|
||||
Route::get('/register/verify/{confirmationCode}', 'HomeController@verify')->name('register_verify');
|
||||
|
||||
Route::get('/status/register', 'HomeController@statusRegister')->name('status_register');
|
||||
Route::get('/status/verify', 'HomeController@statusVerify')->name('status_verify');
|
||||
Route::get('/status/error', 'HomeController@statusError')->name('status_error');
|
||||
|
||||
|
||||
Route::get('/user/update_email_confirm/{token}', 'UpdateEmailController@activateMail')->name('user_update_email_confirm');
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*Route::get('storage/{what}/{path}/{id}/{file_name}', function($what = null, $path = null, $id = null, $file_name = null)
|
||||
{
|
||||
$path = storage_path().'/app/'.$path.'/'.$id.'/images/'.$what.'/'.$file_name;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
});
|
||||
|
||||
Route::get('storage/{user_id}/{file_name}', function($user_id = null, $file_name = null)
|
||||
{
|
||||
$path = storage_path().'/'.'app'.'/user/' . $user_id . '/verification/' . $file_name;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
/*
|
||||
use App\Mail\MailResetPassword;
|
||||
|
||||
Route::get('/send_test_email', function(){
|
||||
|
||||
try {
|
||||
// Mail::to('kevin.adametz@me.com')->send(new MailResetPassword('asdasd', Auth::user()));
|
||||
|
||||
Mail::raw('Sending emails with Mailgun and Laravel is easy!', function($message) {
|
||||
$message->to('kevin.adametz@me.com', 'Kevin Adametz');
|
||||
$message->subject('testing Networktrips');
|
||||
});
|
||||
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
dd($e->getMessage());
|
||||
}
|
||||
|
||||
$fail = Mail::failures();
|
||||
|
||||
if(!empty($fail)) throw new \Exception('Could not send message to '.$fail[0]);
|
||||
|
||||
});
|
||||
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue