From 4803cef69bd48e65f3863bb43e4c71094fd3f411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 11 May 2021 15:02:52 +0200 Subject: [PATCH 1/3] Show the payment number in the client portal --- .../livewire/payments-table.blade.php | 10 +++++++++- .../portal/ninja2020/payments/show.blade.php | 19 +++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/resources/views/portal/ninja2020/components/livewire/payments-table.blade.php b/resources/views/portal/ninja2020/components/livewire/payments-table.blade.php index 51b527a4e4ab..55163bc901b8 100644 --- a/resources/views/portal/ninja2020/components/livewire/payments-table.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/payments-table.blade.php @@ -14,6 +14,11 @@ + @forelse($payments as $payment) + @@ -84,4 +92,4 @@ @endif {{ $payments->links('portal/ninja2020/vendor/pagination') }} - \ No newline at end of file + diff --git a/resources/views/portal/ninja2020/payments/show.blade.php b/resources/views/portal/ninja2020/payments/show.blade.php index 34967fa7402d..f391cffe8199 100644 --- a/resources/views/portal/ninja2020/payments/show.blade.php +++ b/resources/views/portal/ninja2020/payments/show.blade.php @@ -15,7 +15,7 @@
@if(!empty($payment->clientPaymentDate()) && !is_null($payment->clientPaymentDate())) -
+
{{ ctrans('texts.payment_date') }}
@@ -25,6 +25,17 @@
@endif + @if(!empty($payment->number) && !is_null($payment->number)) +
+
+ {{ ctrans('texts.number') }} +
+
+ {{ $payment->number }} +
+
+ @endif + @if(!empty($payment->transaction_reference) && !is_null($payment->transaction_reference))
@@ -39,7 +50,7 @@ @endif @if(!empty(optional($payment->type)->name) && !is_null(optional($payment->type)->name)) -
+
{{ ctrans('texts.method') }}
@@ -61,7 +72,7 @@ @endif @if(!empty($payment->status_id) && !is_null($payment->status_id)) -
+
{{ ctrans('texts.status') }}
@@ -96,7 +107,7 @@
@foreach($payment->invoices as $invoice) -
+
{{ ctrans('texts.invoice_number') }}
From b108dda5e03c3aeda930ab55a6d100f10ea8379d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 11 May 2021 15:15:51 +0200 Subject: [PATCH 2/3] Set 'optional' to address_line_2 in gateways --- app/PaymentDrivers/StripePaymentDriver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 2cbcee27f033..40e429f4660c 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -79,7 +79,7 @@ class StripePaymentDriver extends BaseDriver if($this->stripe_connect) { Stripe::setApiKey(config('ninja.ninja_stripe_key')); - + $this->stripe_connect_auth = ["stripe_account" => $this->company_gateway->getConfigField('account_id')]; } else @@ -186,7 +186,7 @@ class StripePaymentDriver extends BaseDriver if ($this->company_gateway->require_billing_address) { $fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required']; - $fields[] = ['name' => 'client_address_line_2', 'label' => ctrans('texts.address2'), 'type' => 'text', 'validation' => 'required']; + $fields[] = ['name' => 'client_address_line_2', 'label' => ctrans('texts.address2'), 'type' => 'text', 'validation' => 'sometimes']; $fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required']; @@ -194,7 +194,7 @@ class StripePaymentDriver extends BaseDriver if ($this->company_gateway->require_shipping_address) { $fields[] = ['name' => 'client_shipping_address_line_1', 'label' => ctrans('texts.shipping_address1'), 'type' => 'text', 'validation' => 'required']; - $fields[] = ['name' => 'client_shipping_address_line_2', 'label' => ctrans('texts.shipping_address2'), 'type' => 'text', 'validation' => 'required']; + $fields[] = ['name' => 'client_shipping_address_line_2', 'label' => ctrans('texts.shipping_address2'), 'type' => 'text', 'validation' => 'sometimes']; $fields[] = ['name' => 'client_shipping_city', 'label' => ctrans('texts.shipping_city'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_shipping_state', 'label' => ctrans('texts.shipping_state'), 'type' => 'text', 'validation' => 'required']; $fields[] = ['name' => 'client_shipping_postal_code', 'label' => ctrans('texts.shipping_postal_code'), 'type' => 'text', 'validation' => 'required']; From 1f6596e835d5c1987001a449982080e4dfaeb1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 11 May 2021 15:27:13 +0200 Subject: [PATCH 3/3] Make "Pay now" button follow primary-color --- .../ninja2020/components/livewire/pay-now-dropdown.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/portal/ninja2020/components/livewire/pay-now-dropdown.blade.php b/resources/views/portal/ninja2020/components/livewire/pay-now-dropdown.blade.php index 6410d359d166..d0c53470b6fb 100644 --- a/resources/views/portal/ninja2020/components/livewire/pay-now-dropdown.blade.php +++ b/resources/views/portal/ninja2020/components/livewire/pay-now-dropdown.blade.php @@ -5,7 +5,7 @@
+ + {{ ctrans('texts.number') }} + + {{ ctrans('texts.payment_date') }} @@ -45,6 +50,9 @@
+ {{ $payment->number }} + {{ $payment->formatDate($payment->date, $payment->client->date_format()) }}