diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 3b4776c1f389..174ae6721048 100755 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -16,22 +16,22 @@ class HomeController extends BaseController { public function showWelcome() { - return View::make('splash'); + return View::make('public.splash'); } public function showAboutUs() { - return View::make('about_us'); + return View::make('public.about_us'); } public function showContactUs() { - return View::make('contact_us'); + return View::make('public.contact_us'); } public function showTerms() { - return View::make('terms'); + return View::make('public.terms'); } public function doContactUs() diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php index 9d73671cbaf3..af2834da19bc 100755 --- a/app/controllers/PaymentController.php +++ b/app/controllers/PaymentController.php @@ -180,7 +180,15 @@ class PaymentController extends \BaseController $account = $invitation->invoice->client->account; if ($account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) { - return self::do_payment($invitationKey, false); + if (Session::has('error')) + { + Session::reflash(); + return Redirect::to('view/' . $invitationKey); + } + else + { + return self::do_payment($invitationKey, false); + } } $invitation = Invitation::with('contact', 'invoice.client')->where('invitation_key', '=', $invitationKey)->firstOrFail(); @@ -291,7 +299,7 @@ class PaymentController extends \BaseController $invoice = $invitation->invoice; $accountGateway = $invoice->client->account->account_gateways[0]; - $payment = Payment::createNew(); + $payment = Payment::createNew($invitation); $payment->invitation_id = $invitation->id; $payment->account_gateway_id = $accountGateway->id; $payment->invoice_id = $invoice->id; @@ -334,7 +342,7 @@ class PaymentController extends \BaseController $invoice->invoice_status_id = INVOICE_STATUS_PAID; $invoice->save(); - + Event::fire('invoice.paid', $payment); Session::flash('message', 'Successfully applied payment'); diff --git a/app/controllers/UserController.php b/app/controllers/UserController.php index 91e93febe11f..89d8c7504695 100755 --- a/app/controllers/UserController.php +++ b/app/controllers/UserController.php @@ -249,10 +249,13 @@ class UserController extends BaseController { */ public function logout() { - if (!Auth::user()->registered) + if (Auth::check()) { - $account = Auth::user()->account; - $account->forceDelete(); + if (!Auth::user()->registered) + { + $account = Auth::user()->account; + $account->forceDelete(); + } } Confide::logout(); diff --git a/app/routes.php b/app/routes.php index 5b8bc8d7d2b2..332bd03adfdd 100755 --- a/app/routes.php +++ b/app/routes.php @@ -136,7 +136,9 @@ HTML::macro('breadcrumbs', function() { // Get the breadcrumbs by exploding the current path. $basePath = Utils::basePath(); - $path = $_SERVER['REQUEST_URI']; + $parts = explode('?', $_SERVER['REQUEST_URI']); + $path = $parts[0]; + if ($basePath != '/') { $path = str_replace($basePath, '', $path); diff --git a/app/views/about_us.blade.php b/app/views/about_us.blade.php deleted file mode 100644 index 68caa700259a..000000000000 --- a/app/views/about_us.blade.php +++ /dev/null @@ -1,170 +0,0 @@ -@extends('master') - -@section('head') - - - - - -@stop - -@section('body') - -{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} -{{ Form::hidden('guest_key') }} -{{ Form::close() }} - - -
- - -Free yourself from online invoicing platforms with high monthly fees and limited functionality. Being open source allows us fast app development, security audits by the open-course community, and we can keep it FREE!
-Look professional from day #1. Select one of our beautiful invoice templates to suit your company identity, switch between designs in real time to preview invoices & email them to clients with one click. The live preview PDF function was designed for an efficient and hassle-free experience, and it’s awesome! -
-Authorize.net, Beanstream, PayPal? InvoiceNinja supports the most popular online payment gateways! If you need help integrating a third party gateway we don’t yet support, please contact us! We’re happy to help! If you need assistance of want to learn more about online payment solutions, contact us!
-Fill in the form below and we'll get back to you as soon as possible. Hope to hear from you!
- - {{ Form::open(['url' => 'contact', 'class' => 'feedbackForm']) }} -Free yourself from online invoicing platforms with high monthly fees and limited functionality. Being open source allows us fast app development, security audits by the open-course community, and we can keep it FREE!
+Look professional from day #1. Select one of our beautiful invoice templates to suit your company identity, switch between designs in real time to preview invoices & email them to clients with one click. The live preview PDF function was designed for an efficient and hassle-free experience, and it’s awesome! +
+Authorize.net, Beanstream, PayPal? InvoiceNinja supports the most popular online payment gateways! If you need help integrating a third party gateway we don’t yet support, please contact us! We’re happy to help! If you need assistance of want to learn more about online payment solutions, contact us!
+Fill in the form below and we'll get back to you as soon as possible. Hope to hear from you!
+ + {{ Form::open(['url' => 'contact', 'class' => 'feedbackForm']) }} +It's that easy. Stop spending time on
+ complicated and expensive invoicing.
+ No fuss, just get started and get paid.
Invoicing with no monthly fee, because you have enough bills already! Free, now and forever! Quality invoicing to build your business and get paid.
+Cloud-based, super secure, and user-developed. Open source platforms are a better way to do business (and save the world). Need we say more?
+Create beautiful email-ready .PDF invoices created instantly as you type. Our ‘Save & send’ feature saves you time and impresses clients.
+PayPal? Authorize.Net? Stripe? We support many payment technologies and if you need help or advice we’ll lend a hand (we’re pretty friendly).
+
- - - - @stop \ No newline at end of file +@stop \ No newline at end of file diff --git a/app/views/splash.blade.php b/app/views/splash.blade.php deleted file mode 100755 index a9700183b435..000000000000 --- a/app/views/splash.blade.php +++ /dev/null @@ -1,196 +0,0 @@ -@extends('master') - -@section('head') - - - - - -@stop - -@section('body') - -{{ Form::open(array('url' => 'get_started', 'id' => 'startForm')) }} -{{ Form::hidden('guest_key') }} -{{ Form::close() }} - - - - - -
It's that easy. Stop spending time on
- complicated and expensive invoicing.
- No fuss, just get started and get paid.
Invoicing with no monthly fee, because you have enough bills already! Free, now and forever! Quality invoicing to build your business and get paid.
-Cloud-based, super secure, and user-developed. Open source platforms are a better way to do business (and save the world). Need we say more?
-Create beautiful email-ready .PDF invoices created instantly as you type. Our ‘Save & send’ feature saves you time and impresses clients.
-PayPal? Authorize.Net? Stripe? We support many payment technologies and if you need help or advice we’ll lend a hand (we’re pretty friendly).
-