diff --git a/app/Http/Controllers/ClientPortalController.php b/app/Http/Controllers/ClientPortalController.php
index 7ab5256cb349..094db34c11e6 100644
--- a/app/Http/Controllers/ClientPortalController.php
+++ b/app/Http/Controllers/ClientPortalController.php
@@ -137,7 +137,7 @@ class ClientPortalController extends BaseController
$data += [
'transactionToken' => $paymentDriver->createTransactionToken(),
'partialView' => $paymentDriver->partialView(),
- 'accountGateway' => $paymentDriver->accountGateway,
+ 'accountGateway' => $paymentDriver->accountGateway,
];
}
@@ -356,7 +356,7 @@ class ClientPortalController extends BaseController
'clientFontUrl' => $account->getFontsUrl(),
'entityType' => ENTITY_PAYMENT,
'title' => trans('texts.payments'),
- 'columns' => Utils::trans(['invoice', 'transaction_reference', 'method', 'source', 'payment_amount', 'payment_date', 'status'])
+ 'columns' => Utils::trans(['invoice', 'transaction_reference', 'method', 'payment_amount', 'payment_date', 'status'])
];
return response()->view('public_list', $data);
@@ -373,32 +373,6 @@ class ClientPortalController extends BaseController
->addColumn('invoice_number', function ($model) { return $model->invitation_key ? link_to('/view/'.$model->invitation_key, $model->invoice_number)->toHtml() : $model->invoice_number; })
->addColumn('transaction_reference', function ($model) { return $model->transaction_reference ? $model->transaction_reference : 'Manual entry'; })
->addColumn('payment_type', function ($model) { return ($model->payment_type && !$model->last4) ? $model->payment_type : ($model->account_gateway_id ? 'Online payment' : ''); })
- ->addColumn('payment_source', function ($model) {
- $code = str_replace(' ', '', strtolower($model->payment_type));
- $card_type = trans("texts.card_" . $code);
- if ($model->payment_type_id != PAYMENT_TYPE_ACH) {
- if($model->last4) {
- $expiration = trans('texts.card_expiration', array('expires' => Utils::fromSqlDate($model->expiration, false)->format('m/y')));
- return ' •••' . $model->last4 . ' ' . $expiration;
- } elseif ($model->email) {
- return $model->email;
- }
- } elseif ($model->last4) {
- if($model->bank_name) {
- $bankName = $model->bank_name;
- } else {
- $bankData = PaymentMethod::lookupBankData($model->routing_number);
- if($bankData) {
- $bankName = $bankData->name;
- }
- }
- if (!empty($bankName)) {
- return $bankName.' •••' . $model->last4;
- } elseif($model->last4) {
- return '
•••' . $model->last4;
- }
- }
- })
->addColumn('amount', function ($model) { return Utils::formatMoney($model->amount, $model->currency_id, $model->country_id); })
->addColumn('payment_date', function ($model) { return Utils::dateToString($model->payment_date); })
->addColumn('status', function ($model) { return $this->getPaymentStatusLabel($model); })
diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php
index 5b1229484dd8..b6b558624e2d 100644
--- a/app/Http/Controllers/OnlinePaymentController.php
+++ b/app/Http/Controllers/OnlinePaymentController.php
@@ -58,7 +58,7 @@ class OnlinePaymentController extends BaseController
}
return redirect()->to('view/' . $invitation->invitation_key);
} catch (Exception $exception) {
- return $this->error($paymentDriver, $exception);
+ return $this->error($paymentDriver, $exception, true);
}
}
@@ -84,7 +84,7 @@ class OnlinePaymentController extends BaseController
}
}
- private function error($paymentDriver, $exception)
+ private function error($paymentDriver, $exception, $showPayment)
{
if (is_string($exception)) {
$displayError = $exception;
@@ -100,7 +100,8 @@ class OnlinePaymentController extends BaseController
$message = sprintf('Payment Error [%s]: %s', $paymentDriver->providerName(), $logError);
Utils::logError($message, 'PHP', true);
- return redirect()->to('view/' . $paymentDriver->invitation->invitation_key);
+ $route = $showPayment ? 'payment/' : 'view/';
+ return redirect()->to($route . $paymentDriver->invitation->invitation_key);
}
public function getBankInfo($routingNumber) {
diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php
index fe16fcbb9ce4..4412c765236b 100644
--- a/app/Http/Controllers/PaymentController.php
+++ b/app/Http/Controllers/PaymentController.php
@@ -31,7 +31,7 @@ class PaymentController extends BaseController
return View::make('list', array(
'entityType' => ENTITY_PAYMENT,
'title' => trans('texts.payments'),
- 'sortCol' => '6',
+ 'sortCol' => '7',
'columns' => Utils::trans([
'checkbox',
'invoice',
diff --git a/app/Ninja/Datatables/PaymentDatatable.php b/app/Ninja/Datatables/PaymentDatatable.php
index 92473c7fd257..857147ec38f9 100644
--- a/app/Ninja/Datatables/PaymentDatatable.php
+++ b/app/Ninja/Datatables/PaymentDatatable.php
@@ -59,7 +59,7 @@ class PaymentDatatable extends EntityDatatable
$card_type = trans("texts.card_" . $code);
if ($model->payment_type_id != PAYMENT_TYPE_ACH) {
if($model->last4) {
- $expiration = trans('texts.card_expiration', array('expires' => Utils::fromSqlDate($model->expiration, false)->format('m/y')));
+ $expiration = Utils::fromSqlDate($model->expiration, false)->format('m/y');
return '
•••' . $model->last4 . ' ' . $expiration;
} elseif ($model->email) {
return $model->email;
diff --git a/app/Ninja/PaymentDrivers/WePayPaymentDriver.php b/app/Ninja/PaymentDrivers/WePayPaymentDriver.php
index 1f47227ec6fd..c79b216db58e 100644
--- a/app/Ninja/PaymentDrivers/WePayPaymentDriver.php
+++ b/app/Ninja/PaymentDrivers/WePayPaymentDriver.php
@@ -15,6 +15,7 @@ class WePayPaymentDriver extends BasePaymentDriver
];
}
+ /*
public function startPurchase($input = false, $sourceId = false)
{
$data = parent::startPurchase($input, $sourceId);
@@ -27,6 +28,7 @@ class WePayPaymentDriver extends BasePaymentDriver
return $data;
}
+ */
public function tokenize()
{
@@ -167,7 +169,7 @@ class WePayPaymentDriver extends BasePaymentDriver
if ($response->state == 'deleted') {
return parent::removePaymentMethod($paymentMethod);
} else {
- throw new Exception();
+ throw new Exception(trans('texts.failed_remove_payment_method'));
}
}
diff --git a/public/css/built.public.css b/public/css/built.public.css
index 2a02c2db94b6..58d020337711 100644
--- a/public/css/built.public.css
+++ b/public/css/built.public.css
@@ -793,7 +793,7 @@ html {
.navbar-header {
padding-top: 4px;
- padding-bottom: 4px;
+ padding-bottom: 4px;
}
.navbar li a {
padding-top: 18px;
@@ -806,7 +806,7 @@ html {
.navbar {
x-moz-box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
- x-webkit-box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
+ x-webkit-box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
}
@@ -894,7 +894,7 @@ table.table thead .sorting_desc_disabled:after { content: '' !important }
font-weight: 500;
}
-@media screen and (min-width: 700px) {
+@media screen and (min-width: 700px) {
#footer .top {
padding: 27px 0;
}
@@ -935,7 +935,7 @@ th {border-left: 1px solid #FFFFFF; }
table.dataTable.no-footer {
border-bottom: none;
}
-.table-striped>tbody>tr:nth-child(odd)>td,
+.table-striped>tbody>tr:nth-child(odd)>td,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #FDFDFD;
}
@@ -969,4 +969,4 @@ table td {
}
/* hide table sorting indicators */
-table.data-table thead .sorting { background: url('') no-repeat center right; }
\ No newline at end of file
+table.data-table thead .sorting { background: url('') no-repeat center right; }
diff --git a/public/css/public.style.css b/public/css/public.style.css
index b1f91c25739f..a5cdbcc8210e 100644
--- a/public/css/public.style.css
+++ b/public/css/public.style.css
@@ -10,7 +10,7 @@ html {
.navbar-header {
padding-top: 4px;
- padding-bottom: 4px;
+ padding-bottom: 4px;
}
.navbar li a {
padding-top: 18px;
@@ -23,7 +23,7 @@ html {
.navbar {
x-moz-box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
- x-webkit-box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
+ x-webkit-box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
box-shadow: 0 0 10px 2px rgba(0,0,0,.05);
}
@@ -111,7 +111,7 @@ table.table thead .sorting_desc_disabled:after { content: '' !important }
font-weight: 500;
}
-@media screen and (min-width: 700px) {
+@media screen and (min-width: 700px) {
#footer .top {
padding: 27px 0;
}
@@ -152,7 +152,7 @@ th {border-left: 1px solid #FFFFFF; }
table.dataTable.no-footer {
border-bottom: none;
}
-.table-striped>tbody>tr:nth-child(odd)>td,
+.table-striped>tbody>tr:nth-child(odd)>td,
.table-striped>tbody>tr:nth-child(odd)>th {
background-color: #FDFDFD;
}
@@ -186,4 +186,4 @@ table td {
}
/* hide table sorting indicators */
-table.data-table thead .sorting { background: url('') no-repeat center right; }
\ No newline at end of file
+table.data-table thead .sorting { background: url('') no-repeat center right; }
diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php
index 58efc4ecb53d..918fc4b0f3c1 100644
--- a/resources/lang/en/texts.php
+++ b/resources/lang/en/texts.php
@@ -1357,6 +1357,8 @@ $LANG = array(
'use_bank_on_file' => 'Use Bank on File',
'auto_bill_email_message' => 'This invoice will automatically be billed to the payment method on file on the due date.',
'bitcoin' => 'Bitcoin',
+ 'added_on' => 'Added :date',
+ 'failed_remove_payment_method' => 'Failed to remove the payment method',
);
diff --git a/resources/views/error.blade.php b/resources/views/error.blade.php
index 149472fd5011..ec409da311c4 100644
--- a/resources/views/error.blade.php
+++ b/resources/views/error.blade.php
@@ -16,13 +16,4 @@
- - -@stop \ No newline at end of file +@stop diff --git a/resources/views/invoices/pdf.blade.php b/resources/views/invoices/pdf.blade.php index 0e7b2db1ff34..9d777fd587e4 100644 --- a/resources/views/invoices/pdf.blade.php +++ b/resources/views/invoices/pdf.blade.php @@ -1,4 +1,4 @@ - + @if (!Utils::isNinja() || !Utils::isPro()) @@ -140,6 +140,7 @@ canvas.width = viewport.width; page.render({canvasContext: context, viewport: viewport}); + $('#theFrame').hide(); $('#theCanvas').show(); isRefreshing = false; if (needsRefresh) { diff --git a/resources/views/payments/paymentmethods_list.blade.php b/resources/views/payments/paymentmethods_list.blade.php index 5208bcd64a15..4aceca432932 100644 --- a/resources/views/payments/paymentmethods_list.blade.php +++ b/resources/views/payments/paymentmethods_list.blade.php @@ -93,25 +93,30 @@ @else {{ trans('texts.bank_account') }} @endif - @if($paymentMethod->status == PAYMENT_METHOD_STATUS_NEW) - @if($gateway->gateway_id == GATEWAY_STRIPE) - ({{trans('texts.complete_verification')}}) - @else - ({{ trans('texts.verification_pending') }}) - @endif - @elseif($paymentMethod->status == PAYMENT_METHOD_STATUS_VERIFICATION_FAILED) - ({{trans('texts.verification_failed')}}) - @endif @elseif($paymentMethod->payment_type_id == PAYMENT_TYPE_PAYPAL) {{ trans('texts.paypal') . ': ' . $paymentMethod->email }} @else {{ trans('texts.credit_card') }} @endif + - {{ trans('texts.added_on', ['date' => Utils::dateToString($paymentMethod->created_at)]) }} + + @if($paymentMethod->payment_type_id == PAYMENT_TYPE_ACH) + @if($paymentMethod->status == PAYMENT_METHOD_STATUS_NEW) + @if($gateway->gateway_id == GATEWAY_STRIPE) + ({{trans('texts.complete_verification')}}) + @else + [{{ trans('texts.verification_pending') }}] + @endif + @elseif($paymentMethod->status == PAYMENT_METHOD_STATUS_VERIFICATION_FAILED) + [{{trans('texts.verification_failed')}}] + @endif + @endif + @if($paymentMethod->id == $paymentMethod->account_gateway_token->default_payment_method_id) - ({{trans('texts.used_for_auto_bill')}}) + [{{trans('texts.used_for_auto_bill')}}] @elseif($paymentMethod->payment_type_id != PAYMENT_TYPE_ACH || $paymentMethod->status == PAYMENT_METHOD_STATUS_VERIFIED) - ({{trans('texts.use_for_auto_bill')}}) + [{{trans('texts.use_for_auto_bill')}}] @endif × diff --git a/resources/views/public/header.blade.php b/resources/views/public/header.blade.php index 257196c59884..24d652b6b628 100644 --- a/resources/views/public/header.blade.php +++ b/resources/views/public/header.blade.php @@ -53,56 +53,66 @@ function getStarted() { $('#startForm').submit(); return false; -} + } + + $(function() { + // check that the footer appears at the bottom of the screen + var height = $(window).height() - ($('#header').height() + $('#footer').height()); + if ($('#mainContent').height() < height) { + $('#mainContent').height(height); + } + }) + -