diff --git a/.env b/.env index 12547c7..d6d3e4f 100644 --- a/.env +++ b/.env @@ -11,10 +11,15 @@ APP_URL_MAIN= APP_URL_CHECKOUT=checkout. #APP_URL_MAIN=dev. APP_URL_CRM=my. -APP_CHECKOUT_MAIL=register@adametz.media -APP_INFO_MAIL=register@adametz.media +APP_CHECKOUT_MAIL=kevin.adametz@me.com +APP_INFO_MAIL=info@adametz.media + +APP_CHECKOUT_TEST_MAIL=devtest@mivita.care +APP_INFO_TEST_MAIL=devtest@mivita.care #APP_CHECKOUT_MAIL=no-replay@mivita.care + + LOG_CHANNEL=stack DB_CONNECTION=mysql diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ae92f66..b4f266e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,55 +2,48 @@ - - - - - - - - - - + - + - - - - - + + + - - + - - - + + - + + + + - + + + - - + + + + + - - - + @@ -474,10 +470,10 @@ - + - + @@ -491,15 +487,15 @@ - + - + - + - + diff --git a/app/Http/Controllers/AdminUserController.php b/app/Http/Controllers/AdminUserController.php index fbd1bd1..fff3a87 100755 --- a/app/Http/Controllers/AdminUserController.php +++ b/app/Http/Controllers/AdminUserController.php @@ -110,6 +110,11 @@ class AdminUserController extends Controller $user->payment_shop = \Carbon::parse(str_replace("- ", "", $data['payment_shop'])); } } + + if(isset($data['save-test_mode'])){ + $user->test_mode = isset($data['test_mode']) ? true : false;; + } + $user->save(); \Session()->flash('alert-save', true); diff --git a/app/Http/Controllers/Api/PayoneController.php b/app/Http/Controllers/Api/PayoneController.php index b61569d..059e7a4 100755 --- a/app/Http/Controllers/Api/PayoneController.php +++ b/app/Http/Controllers/Api/PayoneController.php @@ -112,6 +112,7 @@ class PayoneController extends Controller 'key' => $data['key'], 'txaction' => $data['txaction'], 'transmitted_data' => Util::utf8ize($data), + 'mode' => $data['mode'], ]); $shopping_order->txaction = $data['txaction']; @@ -179,13 +180,22 @@ class PayoneController extends Controller $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'); + if($data['mode'] === 'test'){ + $billing_email = config('app.checkout_test_mail'); + }else{ + $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, $send_link)); + if($data['mode'] === 'test'){ + $checkout_mail = config('app.checkout_test_mail'); }else{ - Mail::to($billing_email)->bcc($checkout_mail)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $send_link)); + $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, $send_link, $data['mode'])); + }else{ + Mail::to($billing_email)->bcc($checkout_mail)->send(new MailCheckout($data['txaction'], $shopping_order, $shopping_payment, $send_link, $data['mode'])); } print("TSOK"); diff --git a/app/Http/Controllers/CronController.php b/app/Http/Controllers/CronController.php index ee89966..e38eea4 100644 --- a/app/Http/Controllers/CronController.php +++ b/app/Http/Controllers/CronController.php @@ -28,7 +28,10 @@ class CronController extends Controller public function index() { - $this->checkConfirmation(); + //$this->checkConfirmation(); + //TODO + //SEPA Booking + //Mail reminder } /** diff --git a/app/Http/Controllers/DataTableController.php b/app/Http/Controllers/DataTableController.php index a2e3776..ead1f46 100644 --- a/app/Http/Controllers/DataTableController.php +++ b/app/Http/Controllers/DataTableController.php @@ -75,12 +75,17 @@ class DataTableController extends Controller return ' '; }) + ->addColumn('test_mode', function (User $user) { + $link = ''; + return $user->test_mode ? $link.'' : $link.''; + + }) ->orderColumn('id', 'id $1') ->orderColumn('confirmed', 'confirmed $1') ->orderColumn('active', 'active $1') ->orderColumn('shop', 'shop $1') ->orderColumn('admin', 'active $1') - ->rawColumns(['id', 'admin', 'confirmed', 'active', 'account', 'shop', 'action_delete']) + ->rawColumns(['id', 'admin', 'confirmed', 'active', 'account', 'shop', 'test_mode', 'action_delete']) ->make(true); } } diff --git a/app/Http/Controllers/MembershipController.php b/app/Http/Controllers/MembershipController.php index d005f7c..c10de4e 100755 --- a/app/Http/Controllers/MembershipController.php +++ b/app/Http/Controllers/MembershipController.php @@ -145,7 +145,11 @@ class MembershipController extends Controller if(Input::get('delete_membership_mivita')){ //TODO $user = User::find(Auth::user()->id); - $mail = config('app.info_mail'); + if($user->isTestMode()){ + $mail = config('app.info_test_mail'); + }else{ + $mail = config('app.info_mail'); + } Mail::to($mail)->send(new MailInfo($user, 'delete_membership')); UserHistory::create(['user_id' => $user->id, 'action'=>$action, 'status'=>50]); \Session()->flash('alert-success', "Mitgliedschaft beenden ist beantragt"); diff --git a/app/Http/Controllers/Pay/PayoneController.php b/app/Http/Controllers/Pay/PayoneController.php index 7e0f1b4..5cc7e03 100644 --- a/app/Http/Controllers/Pay/PayoneController.php +++ b/app/Http/Controllers/Pay/PayoneController.php @@ -105,8 +105,10 @@ class PayoneController extends Controller 'reference' => $this->reference, 'amount' => $amount, 'currency' => $currency, + 'mode' => $this->shopping_order->mode, ]); + $this->default['mode'] = $this->shopping_order->mode; return $this->reference; } @@ -232,6 +234,7 @@ class PayoneController extends Controller 'errormessage' => $response['errormessage'], 'customermessage' => $response['customermessage'], 'status' => $response['status'], + 'mode' => $this->shopping_payment->mode, ]); Util::setUserHistoryValue(['status'=>3]); \Session::flash('errormessage', $response['errormessage']); @@ -247,6 +250,8 @@ class PayoneController extends Controller 'txid' => $response['txid'], 'userid' => $response['userid'], 'status' => $response['status'], + 'mode' => $this->shopping_payment->mode, + ]); Util::setUserHistoryValue(['status'=>4]); return redirect()->away($response["redirecturl"]); @@ -263,6 +268,8 @@ class PayoneController extends Controller 'userid' => $response['userid'], 'status' => $response['status'], 'transmitted_data' => $response, + 'mode' => $this->shopping_payment->mode, + ]); Util::setUserHistoryValue(['status'=>5]); if($payt->shopping_payment->clearingtype === "vor"){ diff --git a/app/Http/Controllers/SalesController.php b/app/Http/Controllers/SalesController.php index 46432c2..92a8500 100755 --- a/app/Http/Controllers/SalesController.php +++ b/app/Http/Controllers/SalesController.php @@ -6,6 +6,7 @@ namespace App\Http\Controllers; use App\Models\Country; use App\Models\ShoppingOrder; +use App\Models\UserShop; use Input; @@ -45,7 +46,7 @@ class SalesController extends Controller public function usersDatatable(){ - $query = ShoppingOrder::with('shopping_user')->where('shopping_orders.auth_user_id', '!=', NULL); + $query = ShoppingOrder::with('shopping_user', 'user_shop')->where('shopping_orders.auth_user_id', '!=', NULL); return \DataTables::eloquent($query) ->addColumn('billing_firstname', function (ShoppingOrder $ShoppingOrder) { @@ -61,6 +62,9 @@ class SalesController extends Controller return $ShoppingOrder->created_at->format("d.m.Y"); }) ->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) { + if($ShoppingOrder->mode === 'test'){ + return 'TEST - '.$ShoppingOrder->getFormattedTxaction().''; + } return ''.$ShoppingOrder->getFormattedTxaction().''; }) ->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) { @@ -72,6 +76,12 @@ class SalesController extends Controller ->addColumn('user_shop_id', function (ShoppingOrder $ShoppingOrder) { return $ShoppingOrder->user_shop ? ''.$ShoppingOrder->user_shop->getSubdomain().'' : ''; }) + ->addColumn('auth_user_shop', function (ShoppingOrder $ShoppingOrder) { + $auth_user_shop = UserShop::whereUserId($ShoppingOrder->auth_user_id)->first(); + + return $auth_user_shop ? ''.$auth_user_shop->getSubdomain().'' : '-'; + }) + ->addColumn('id', function (ShoppingOrder $ShoppingOrder) { return ''; }) @@ -92,7 +102,7 @@ class SalesController extends Controller ->orderColumn('txaction', 'txaction $1') ->orderColumn('user_shop_id', 'user_shop_id $1') - ->rawColumns(['id', 'txaction', 'user_shop_id']) + ->rawColumns(['id', 'txaction', 'user_shop_id', 'auth_user_shop']) ->make(true); } @@ -137,6 +147,9 @@ class SalesController extends Controller return $ShoppingOrder->created_at->format("d.m.Y"); }) ->addColumn('txaction', function (ShoppingOrder $ShoppingOrder) { + if($ShoppingOrder->mode === 'test'){ + return 'TEST - '.$ShoppingOrder->getFormattedTxaction().''; + } return ''.$ShoppingOrder->getFormattedTxaction().''; }) ->addColumn('total_shipping', function (ShoppingOrder $ShoppingOrder) { diff --git a/app/Http/Controllers/Web/CheckoutController.php b/app/Http/Controllers/Web/CheckoutController.php index 3c43aed..f17c4db 100755 --- a/app/Http/Controllers/Web/CheckoutController.php +++ b/app/Http/Controllers/Web/CheckoutController.php @@ -88,6 +88,7 @@ class CheckoutController extends Controller $data = [ 'user_shop' => Util::getUserShop(), 'shopping_user' => $shopping_user, + 'shopping_mode' => Util::getUserShoppingMode(), ]; return view('web.templates.checkout', $data); } @@ -329,6 +330,7 @@ class CheckoutController extends Controller 'tax' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ','), 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ','), 'weight' => Yard::instance('shopping')->weight(), + 'mode' => Util::getUserShoppingMode(), ]; $shopping_order= false; if($this->getPayments('shopping_order_id')){ diff --git a/app/Http/Controllers/WizardController.php b/app/Http/Controllers/WizardController.php index 16226b4..bc9f7a1 100755 --- a/app/Http/Controllers/WizardController.php +++ b/app/Http/Controllers/WizardController.php @@ -7,6 +7,7 @@ use App\Models\File; use App\Models\Product; use App\Models\ShoppingInstance; use App\Models\UserAccount; +use App\Models\UserHistory; use App\Repositories\FileRepository; use App\Services\Util; use App\User; @@ -51,12 +52,16 @@ class WizardController extends Controller $step = !$user->wizard ? 0 : $user->wizard; if($step >= 20){ - return redirect('/'); + return redirect('/home'); } + $userHistoryWizardPayment = UserHistory::whereUserId($user->id)->whereAction('wizard_payment')->get()->last(); + $data = [ 'user' => Auth::user(), 'step' => $step, 'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(), + 'userHistoryWizardPayment' => $userHistoryWizardPayment, + ]; if($step == 15){ @@ -83,7 +88,7 @@ class WizardController extends Controller $step = !$user->wizard ? 0 : $user->wizard; if($step >= 10){ - return redirect('/'); + return redirect('/home'); } $data = [ 'user' => Auth::user(), @@ -111,10 +116,14 @@ class WizardController extends Controller return redirect(route('wizard_payment')); } + $userHistoryWizardPayment = UserHistory::whereUserId($user->id)->whereAction('wizard_payment')->get()->last(); + + $data = [ 'user' => Auth::user(), 'step' => 0, 'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(), + 'userHistoryWizardPayment' => $userHistoryWizardPayment, ]; if($user->wizard == 20){ @@ -137,7 +146,6 @@ class WizardController extends Controller } if ($step == 0) { - $rules = array( 'accepted_data_protection' => 'required', 'accepted_active' => 'required', @@ -244,11 +252,16 @@ class WizardController extends Controller } if ($step == 4) { - $user->wizard = 5; $user->release_account = now(); $user->save(); - Mail::to('kevin@adametz.media')->bcc(['kevin.adametz@me.com'])->send(new MailReleaseAccount($user)); + + if($user->isTestMode()){ + $mail = config('app.info_test_mail'); + }else{ + $mail = config('app.info_mail'); + } + Mail::to($mail)->send(new MailReleaseAccount($user)); return redirect(route('wizard_register')); } @@ -371,13 +384,16 @@ class WizardController extends Controller } } + public function storePayment($step = 0){ if(Input::get('switchers-package-wizard')){ - $user = Auth::user(); + $user = User::find(Auth::user()->id); Yard::instance('shopping')->destroy(); $product = Product::find(Input::get('switchers-package-wizard')); + $showAboOptions = false; if(Input::get('abo_options')){ + $showAboOptions = true; $user->abo_options = true; $user->save(); } @@ -396,7 +412,7 @@ class WizardController extends Controller 'identifier' => $identifier, 'user_shop_id' => 1, //is first faker shop for buy intern 'auth_user_id' => Auth::user()->id, - 'payment' => 4, + 'payment' => 4, //Berater Wizard 'subdomain' => url('/'), 'country_id' => Yard::instance('shopping')->getShippingCountryId(), @@ -404,6 +420,7 @@ class WizardController extends Controller Yard::instance('shopping')->store($identifier); //add to DB $path = route('checkout.checkout_card', ['identifier'=>$identifier]); + UserHistory::create(['user_id' => $user->id, 'action'=>'wizard_payment', 'status'=>1, 'product_id'=>$product->id, 'identifier'=>$identifier, 'abo_options'=>$showAboOptions]); //$path = str_replace('http', 'https', $path); return redirect()->secure($path); diff --git a/app/Mail/MailCheckout.php b/app/Mail/MailCheckout.php index 4c899e3..91dffe0 100644 --- a/app/Mail/MailCheckout.php +++ b/app/Mail/MailCheckout.php @@ -12,21 +12,23 @@ class MailCheckout extends Mailable { use Queueable, SerializesModels; - public $txaction; - public $shopping_order; - public $shopping_payment; + protected $txaction; + protected $shopping_order; + protected $shopping_payment; protected $send_link; + protected $mode; public $subject; public $data; - public function __construct($txaction, $shopping_order, $shopping_payment, $send_link) + public function __construct($txaction, $shopping_order, $shopping_payment, $send_link, $mode) { $this->txaction = $txaction; $this->shopping_order = $shopping_order; $this->shopping_payment = $shopping_payment; $this->send_link = $send_link; + $this->mode = $mode; $this->subject = __('email.checkout_subject')." mivita.care"; if($shopping_order->user_shop){ @@ -45,7 +47,6 @@ class MailCheckout extends Mailable } if($this->txaction === 'paid'){ - if($this->send_link){ } @@ -60,6 +61,7 @@ class MailCheckout extends Mailable 'send_link' => $this->send_link, 'url' => Util::getMyMivitaUrl(), 'button' => Util::getMyMivitaUrl(false), + 'mode' => $this->mode ]); }else{ return $this->view('emails.checkout_status')->with([ @@ -72,6 +74,7 @@ class MailCheckout extends Mailable 'greetings' => __('email.greetings'), 'sender' => __('email.sender'), 'send_link' => false, + 'mode' => $this->mode ]); } diff --git a/app/Mail/MailInfo.php b/app/Mail/MailInfo.php index 57c9ad1..0b55138 100644 --- a/app/Mail/MailInfo.php +++ b/app/Mail/MailInfo.php @@ -48,16 +48,16 @@ class MailInfo extends Mailable if($this->action === "delete_membership"){ - $copy1line = "Ein Berater möchte seine Mitgliedschaft beenden."."\n"; + $copy1line = "Infos zum Berater:"."\n"; + $button = "zum Berater"; + $title = "Ein Berater möchte seine Mitgliedschaft beenden."; } - - return $this->view('emails.info')->with([ 'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead', - 'salutation' => 'Berater Registrierung pürfen', - 'button' => 'zur Berater Prüfung', + 'title' => $title, + 'button' => $button, 'copy1line' => $copy1line, 'copy2line' => __('email.copy2line'), 'content' => $content, diff --git a/app/Mail/MailReleaseAccount.php b/app/Mail/MailReleaseAccount.php index 49869d8..5a403b4 100644 --- a/app/Mail/MailReleaseAccount.php +++ b/app/Mail/MailReleaseAccount.php @@ -18,7 +18,7 @@ class MailReleaseAccount extends Mailable public function __construct(User $user) { $this->user = $user; - $this->subject = 'Berater Registrierung pürfen'; + $this->subject = 'Neuer Berater Registrierung prüfen'; } @@ -54,7 +54,7 @@ class MailReleaseAccount extends Mailable return $this->view('emails.info')->with([ 'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead', - 'salutation' => 'Berater Registrierung pürfen', + 'title' => 'Berater Registrierung prüfen', 'button' => 'zur Berater Prüfung', 'copy1line' => $copy1line, 'copy2line' => __('email.copy2line'), diff --git a/app/Models/PaymentTransaction.php b/app/Models/PaymentTransaction.php index aa3e918..61601ab 100644 --- a/app/Models/PaymentTransaction.php +++ b/app/Models/PaymentTransaction.php @@ -62,6 +62,7 @@ class PaymentTransaction extends Model 'errorcode', 'errormessage', 'customermessage', + 'mode', ]; diff --git a/app/Models/ShoppingOrder.php b/app/Models/ShoppingOrder.php index 99cefe3..ab0be95 100644 --- a/app/Models/ShoppingOrder.php +++ b/app/Models/ShoppingOrder.php @@ -70,6 +70,7 @@ class ShoppingOrder extends Model 'tax', 'total_shipping', 'weight', + 'mode', ]; protected $txaction_text = [ diff --git a/app/Models/ShoppingPayment.php b/app/Models/ShoppingPayment.php index f25a5db..7f75eb7 100644 --- a/app/Models/ShoppingPayment.php +++ b/app/Models/ShoppingPayment.php @@ -51,6 +51,7 @@ class ShoppingPayment extends Model 'reference', 'amount', 'currency', + 'mode' ]; diff --git a/app/Services/Util.php b/app/Services/Util.php index 5e2fa97..c2e5d06 100644 --- a/app/Services/Util.php +++ b/app/Services/Util.php @@ -117,6 +117,14 @@ class Util return null; } + public static function getUserShoppingMode(){ + if($auth_user = self::getAuthUser()){ + if($auth_user->isTestMode()){ + return 'test'; + } + } + return 'live'; + } public static function addRoute($p = []){ $b = []; if(\Session::has('user_shop')){ diff --git a/app/User.php b/app/User.php index 043740b..d59c718 100755 --- a/app/User.php +++ b/app/User.php @@ -217,6 +217,15 @@ class User extends Authenticatable return false; } + /** + * @return bool + */ + public function isTestMode() + { + return $this->test_mode ? true : false; + } + + /** * @return bool */ diff --git a/archiv.tar b/archiv.tar new file mode 100644 index 0000000..d59eb89 Binary files /dev/null and b/archiv.tar differ diff --git a/config/app.php b/config/app.php index 26121b0..c8e1efc 100755 --- a/config/app.php +++ b/config/app.php @@ -61,7 +61,10 @@ return [ 'pre_url_crm' => env('APP_URL_CRM', 'my.'), 'checkout_url' => env('APP_URL_CHECKOUT', 'checkout.'), 'checkout_mail' => env('APP_CHECKOUT_MAIL', 'no-replay@mivita.care'), + 'checkout_test_mail' => env('APP_CHECKOUT_TEST_MAIL', 'devtest@mivita.care'), 'info_mail' => env('APP_INFO_MAIL', 'no-replay@mivita.care'), + 'info_test_mail' => env('APP_INFO_TEST_MAIL', 'devtest@mivita.care'), + /* 'url_backend' => env('APP_URL', 'http://mivita.local/'), 'url_backend' => env('APP_URL', 'http://mivita.local/'), diff --git a/config/payone.php b/config/payone.php index 7aeb050..5905745 100755 --- a/config/payone.php +++ b/config/payone.php @@ -6,7 +6,7 @@ return [ "mid" => '42504',//"your_merchant_id", "portalid" => '2030693', "key" => hash("md5", "Zjop5cvP2UeB7Qhy"), // the key has to be hashed as md5 - "mode" => "test", // can be "live" for actual transactions + "mode" => "live", // can be "live" for actual transactions "api_version" => "3.11", "encoding" => "UTF-8" ] diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index f1a40e5..8471808 100755 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -50,6 +50,8 @@ class CreateUsersTable extends Migration $table->timestamp('payment_shop')->nullable(); $table->boolean('abo_options')->default(false); + $table->boolean('test_mode')->default(false); + $table->timestamps(); $table->softDeletes(); diff --git a/database/migrations/2019_02_23_163527_create_shopping_orders_table.php b/database/migrations/2019_02_23_163527_create_shopping_orders_table.php index 1b23e54..db74d89 100644 --- a/database/migrations/2019_02_23_163527_create_shopping_orders_table.php +++ b/database/migrations/2019_02_23_163527_create_shopping_orders_table.php @@ -36,6 +36,8 @@ class CreateShoppingOrdersTable extends Migration $table->boolean('paid')->default(false); $table->string('txaction', 20)->nullable()->index(); + $table->char('mode', 4)->nullable(); + $table->timestamps(); diff --git a/database/migrations/2019_02_23_163832_create_shopping_payments_table.php b/database/migrations/2019_02_23_163832_create_shopping_payments_table.php index 8155cd0..b47d101 100644 --- a/database/migrations/2019_02_23_163832_create_shopping_payments_table.php +++ b/database/migrations/2019_02_23_163832_create_shopping_payments_table.php @@ -29,6 +29,8 @@ class CreateShoppingPaymentsTable extends Migration $table->string('status', 10)->nullable()->index(); $table->string('txaction', 20)->nullable()->index(); + $table->char('mode', 4)->nullable(); + $table->timestamps(); $table->foreign('shopping_order_id') diff --git a/database/migrations/2019_02_25_090014_create_payment_transactions_table.php b/database/migrations/2019_02_25_090014_create_payment_transactions_table.php index fc708ff..6ac7c4a 100644 --- a/database/migrations/2019_02_25_090014_create_payment_transactions_table.php +++ b/database/migrations/2019_02_25_090014_create_payment_transactions_table.php @@ -34,6 +34,7 @@ class CreatePaymentTransactionsTable extends Migration $table->string('errormessage')->nullable(); $table->string('customermessage')->nullable(); + $table->char('mode', 4)->nullable(); $table->timestamps(); diff --git a/resources/lang/de/payment.php b/resources/lang/de/payment.php index 412c93e..7a912a2 100755 --- a/resources/lang/de/payment.php +++ b/resources/lang/de/payment.php @@ -6,11 +6,11 @@ return [ 'store_payment' => 'Zahlung gespeichert', 'checkout_payment' => 'Checkout', 'payment_error' => 'Zahlung Fehler', - 'payment_redirect' => 'Zahlung weitergeleitet', - 'payment_approved' => 'Zahlung genehmigt', - 'txaction_failed' => 'Zahlung fehlgeschlagen', - 'txaction_appointed' => 'Zahlung genehmigt', - 'txaction_paid' => 'Zahlung bestätigt', + 'payment_redirect' => 'Zahlung in Bearbeitung - bitte auf E-Mail warten', + 'payment_approved' => 'Zahlung genehmigt - bitte auf E-Mail warten', + 'txaction_failed' => 'Zahlung fehlgeschlagen - E-Mail wurde gesendet', + 'txaction_appointed' => 'Zahlung genehmigt - E-Mail wurde gesendet, bitte warten auf Bestätigung', + 'txaction_paid' => 'Zahlung bestätigt - E-Mail wurde gesendet', 'success_payment' => 'Zahlung erflogreich', 'success' => 'Erflogreich ausgeführt', 'payment_not_found' => 'Zahlung nicht gefunden', diff --git a/resources/views/admin/sales/users.blade.php b/resources/views/admin/sales/users.blade.php index 81248c1..b1a9140 100644 --- a/resources/views/admin/sales/users.blade.php +++ b/resources/views/admin/sales/users.blade.php @@ -22,7 +22,7 @@ {{__('Status')}} {{__('Betrag')}} {{__('Käufe')}} - {{__('Shop')}} + {{__('User-Shop')}} @@ -44,7 +44,7 @@ { data: 'txaction', name: 'txaction' }, { data: 'total_shipping', name: 'shopping_orders.total_shipping' }, { data: 'orders', name: 'shopping_user.orders' }, - { data: 'user_shop_id', name: 'user_shop_id' }, + { data: 'auth_user_shop', name: 'auth_user_shop' }, ], "bLengthChange": false, "iDisplayLength": 100, diff --git a/resources/views/admin/user/index.blade.php b/resources/views/admin/user/index.blade.php index 6bdde49..dcdf720 100644 --- a/resources/views/admin/user/index.blade.php +++ b/resources/views/admin/user/index.blade.php @@ -23,6 +23,7 @@ {{__('Account')}} (bis) {{__('Shop')}} (bis) {{__('Shop')}} ab + {{__('Test Modus')}} {{__('delete')}} @@ -60,10 +61,12 @@ - - @@ -218,6 +221,42 @@ + + + - - + + diff --git a/resources/views/user/form.blade.php b/resources/views/user/form.blade.php index 9a3ca1f..5418e14 100644 --- a/resources/views/user/form.blade.php +++ b/resources/views/user/form.blade.php @@ -77,6 +77,11 @@ {{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 18)) }} + @if ($errors->has('phone')) + + {{ $errors->first('phone') }} + + @endif @@ -92,6 +97,11 @@ {{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 19)) }} + @if ($errors->has('mobil')) + + {{ $errors->first('mobil') }} + + @endif
diff --git a/resources/views/user/membership/index.blade.php b/resources/views/user/membership/index.blade.php index 09b46db..e0f17a2 100644 --- a/resources/views/user/membership/index.blade.php +++ b/resources/views/user/membership/index.blade.php @@ -48,12 +48,26 @@ @endif @endif - @include('user.membership._payment_order') @else + {{-- no Shop - Upgrade --}} + @if($user->isActiveAccount() && !$user->isActiveShop()) +
+
{{__('MIVITA BUSINESS Paket')}} {{__('Upgrade')}}
+
+ @if($userHistoryUpgradeOrder && $userHistoryUpgradeOrder->status > 2) +
Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryUpgradeOrder->getStatusType())}}
+ @endif +
Erweitere jetzt Deine Mitglidschaft auf MIVITA BUSINESS Paket!
+

Berechnet werden die restlichen Monate bis zur Berater-Mitgliedschaft Verlängerung. Danach wird jährlich der MIVITA BUSINESS Paketpreis berechnet.

+ @include('user.membership._upgrade') +
+
+ @endif + {{-- upgrade downgrade next booking --}} @if($user->payment_account)
@@ -66,17 +80,7 @@
@endif - {{-- no Shop - Upgrade --}} - @if($user->isActiveAccount() && !$user->isActiveShop()) -
-
{{__('MIVITA BUSINESS Paket')}} {{__('Upgrade')}}
-
-
Erweitere jetzt Deine Mitglidschaft auf MIVITA BUSINESS Paket!
-

Berechnet werden die restlichen Monate bis zur Berater-Mitgliedschaft Verlängerung. Danach wird jährlich der MIVITA BUSINESS Paketpreis berechnet.

- @include('user.membership._upgrade') -
-
- @endif + {{-- remove ABO Options --}} @@ -127,9 +131,6 @@ - - - {{-- TODO //cron sepa diff --git a/resources/views/user/user_form.blade.php b/resources/views/user/user_form.blade.php index a50c650..368ffcc 100644 --- a/resources/views/user/user_form.blade.php +++ b/resources/views/user/user_form.blade.php @@ -98,7 +98,7 @@ {!! HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!} -
+
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 11)) }}
@@ -110,14 +110,18 @@ {!! HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
- -
+
{{ Form::text('mobil', $user->account->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 13)) }}
-
Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*
+ @if($errors->has('phone') || $errors->has('mobil')) +
Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*
+ @else +
Bitte {{ __('Phone') }} und/oder {{ __('Mobile Phone') }} angeben!*
+ @endif
+
@if(!isset($step))
diff --git a/resources/views/user/wizard/_payment.blade.php b/resources/views/user/wizard/_payment.blade.php index c375a0c..6d372b3 100644 --- a/resources/views/user/wizard/_payment.blade.php +++ b/resources/views/user/wizard/_payment.blade.php @@ -1,15 +1,5 @@ - @if($user->shopping_orders->count()) - @php - $last_shopping_order = $user->shopping_orders->last(); - $last_shopping_payments = $last_shopping_order->shopping_payments->last(); - @endphp -
- Es wurde eine Zahlung ausgeführt. Referenz: {{$last_shopping_payments->reference }}. -
Bitte warte die Zahlungs-Bestätiung per E-Mail. -
- @endif {!! Form::open(['url' => route('wizard_store_payment', [20]), 'class' => 'form-horizontal']) !!}
diff --git a/resources/views/user/wizard/create.blade.php b/resources/views/user/wizard/create.blade.php index 021d11a..e923681 100644 --- a/resources/views/user/wizard/create.blade.php +++ b/resources/views/user/wizard/create.blade.php @@ -100,6 +100,9 @@
+ @if($userHistoryWizardPayment && $userHistoryWizardPayment->status > 2) +
Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryWizardPayment->getStatusType())}}
+ @endif @include('user.wizard._payment')
diff --git a/resources/views/user/wizard/register.blade.php b/resources/views/user/wizard/register.blade.php index 20d7a8d..ed36c98 100644 --- a/resources/views/user/wizard/register.blade.php +++ b/resources/views/user/wizard/register.blade.php @@ -249,7 +249,6 @@ acceptedFiles: "image/jpeg,image/pjpeg,image/png,image/gif,application/pdf,text/plain", // The setting up of the dropzone init:function() { - this.on("removedfile", function(file) { var _ele = $('.alert-danger'); _ele.fadeOut(); diff --git a/resources/views/user/wizard/register_payment.blade.php b/resources/views/user/wizard/register_payment.blade.php index 6fa56b6..49b1796 100644 --- a/resources/views/user/wizard/register_payment.blade.php +++ b/resources/views/user/wizard/register_payment.blade.php @@ -35,6 +35,9 @@
+ @if($userHistoryWizardPayment && $userHistoryWizardPayment->status > 2) +
Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryWizardPayment->getStatusType())}}
+ @endif @include('user.wizard._payment')
diff --git a/resources/views/web/templates/checkout.blade.php b/resources/views/web/templates/checkout.blade.php index ecfc05b..2d73f05 100644 --- a/resources/views/web/templates/checkout.blade.php +++ b/resources/views/web/templates/checkout.blade.php @@ -435,7 +435,9 @@
- + @if($shopping_mode === 'test') + #### TEST MODE #### TEST MODE #### + @endif

Zahlungsart

diff --git a/vendor.zip b/vendor.zip deleted file mode 100644 index d378a0c..0000000 Binary files a/vendor.zip and /dev/null differ