@@ -35,58 +32,17 @@
-
-
-
-
- {{ ctrans('texts.subtotal') }}
-
- -
- {{ App\Utils\Number::formatMoney($total['invoice_totals'], $client) }}
-
- @if($total['fee_total'] > 0)
- -
- {{ ctrans('texts.gateway_fees') }}
-
- -
- {{ App\Utils\Number::formatMoney($total['fee_total'], $client) }}
-
- @endif
- @if($total['credit_totals'] > 0)
- -
- {{ ctrans('texts.credit_amount') }}
-
- -
- {{ App\Utils\Number::formatMoney($total['credit_totals'], $client) }}
-
- @endif
- -
- {{ ctrans('texts.amount_due') }}
-
- -
- {{ App\Utils\Number::formatMoney($total['amount_with_fee'], $client) }}
-
-
+ @include('portal.ninja2020.gateways.includes.payment_details')
+
@if((int)$total['amount_with_fee'] == 0)
-
-
-
-
+ @include('portal.ninja2020.gateways.stripe.includes.pay_with_credit')
@elseif($token)
-
-
-
- {{ ctrans('texts.credit_card') }}
-
- -
- {{ strtoupper($token->meta->brand) }} - **** {{ $token->meta->last4 }}
-
-
+ @include('portal.ninja2020.gateways.stripe.includes.pay_with_token')
+ @else
+ @include('portal.ninja2020.gateways.stripe.includes.card_widget')
+
-
- @else
-
-
-
- {{ ctrans('texts.name') }}
-
- -
-
-
-
-
-
-
-
- {{ ctrans('texts.credit_card') }}
-
-
-
-
-
-
-
-
-
-
- {{ ctrans('texts.token_billing_checkbox') }}
-
- -
-
-
-
-
-
-
-
-
- {{ __('texts.save') }}
-
-
@endif
diff --git a/resources/views/portal/ninja2020/gateways/stripe/includes/card_widget.blade.php b/resources/views/portal/ninja2020/gateways/stripe/includes/card_widget.blade.php
new file mode 100644
index 000000000000..db649eb7fe0f
--- /dev/null
+++ b/resources/views/portal/ninja2020/gateways/stripe/includes/card_widget.blade.php
@@ -0,0 +1,39 @@
+@unless(isset($show_name) && $show_name == false)
+
+
+ {{ ctrans('texts.name') }}
+
+
+
+
+
+@endunless
+
+@unless(isset($show_card_element) && $show_card_element == false)
+
+
+ {{ ctrans('texts.credit_card') }}
+
+
+
+
+
+@endunless
+
+@unless(isset($show_save) && $show_save == false)
+
+
+ {{ ctrans('texts.token_billing_checkbox') }}
+
+
+
+
+
+
+@endunless
diff --git a/resources/views/portal/ninja2020/gateways/stripe/includes/pay_with_credit.blade.php b/resources/views/portal/ninja2020/gateways/stripe/includes/pay_with_credit.blade.php
new file mode 100644
index 000000000000..b8ad2f749cd9
--- /dev/null
+++ b/resources/views/portal/ninja2020/gateways/stripe/includes/pay_with_credit.blade.php
@@ -0,0 +1,8 @@
+
+
+
+ Pay with credit
+
diff --git a/resources/views/portal/ninja2020/gateways/stripe/includes/pay_with_token.blade.php b/resources/views/portal/ninja2020/gateways/stripe/includes/pay_with_token.blade.php
new file mode 100644
index 000000000000..ec1fff9a750a
--- /dev/null
+++ b/resources/views/portal/ninja2020/gateways/stripe/includes/pay_with_token.blade.php
@@ -0,0 +1,17 @@
+
+
+ {{ ctrans('texts.credit_card') }}
+
+
+ {{ strtoupper($token->meta->brand) }} - **** {{ $token->meta->last4 }}
+
+
+
+
+
+ {{ __('texts.pay_now') }}
+
+