checkout: push aditional page

This commit is contained in:
Benjamin Beganović 2020-10-19 23:49:17 +02:00
parent 810f342907
commit 6af7aa7dc0
4 changed files with 33 additions and 14 deletions

View File

@ -318,7 +318,7 @@ class CheckoutComPaymentDriver extends BaseDriver
{
$error_message = json_decode($e->getBody());
PaymentFailureMailer::dispatch($this->client, $error_message->message, $this->client->company, $state['value']);
PaymentFailureMailer::dispatch($this->client, optional($error_message)->message, $this->client->company, $state['value']);
$message = [
'server_response' => $state['server_response'],

View File

@ -1,6 +1,6 @@
@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Checkout.com'])
@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Checkout.com', 'card_title' => 'Checkout.com'])
@section('payment-head')
@section('gateway_head')
<meta name="public-key" content="{{ $gateway->getPublishableKey() }}">
<meta name="customer-email" content="{{ $customer_email }}">
<meta name="value" content="{{ $value }}">
@ -8,7 +8,7 @@
<meta name="reference" content="{{ $payment_hash }}">
@endsection
@section('payment-content')
@section('gateway_content')
<form action="{{ route('client.payments.response') }}" method="post" id="server-response">
@csrf
<input type="hidden" name="gateway_response">
@ -31,9 +31,9 @@
@endcomponent
@include('portal.ninja2020.gateways.includes.payment_details')
@include('portal.ninja2020.gateways.includes.store_for_future')
@include('portal.ninja2020.gateways.includes.save_card')
@component('portal.ninja2020.components.general.card-element', ['title' => ''])
@component('portal.ninja2020.components.general.card-element-single')
<form class="payment-form" method="POST" action="#">
@if(app()->environment() == 'production')
<script async src="https://cdn.checkout.com/js/checkout.js"></script>
@ -44,6 +44,6 @@
@endcomponent
@endsection
@section('payment-footer')
@section('gateway_footer')
<script src="{{ asset('js/clients/payments/checkout.com.js') }}"></script>
@endsection

View File

@ -0,0 +1,17 @@
@unless(isset($show_save) && $show_save == false)
<div class="{{ ($gateway->token_billing == 'optin' || $gateway->token_billing == 'optout') ? 'sm:grid' : 'hidden' }} px-4 py-5 sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm leading-5 font-medium text-gray-500">
{{ ctrans('texts.token_billing_checkbox') }}
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<label class="mr-4">
<input type="radio" class="form-radio cursor-pointer" name="token-billing-checkbox" id="proxy_is_default" value="true" {{ ($gateway->token_billing == 'always' || $gateway->token_billing == 'optout') ? 'checked' : '' }} />
<span class="ml-1 cursor-pointer">{{ ctrans('texts.yes') }}</span>
</label>
<label>
<input type="radio" class="form-radio cursor-pointer" name="token-billing-checkbox" id="proxy_is_default" value="false" {{ ($gateway->token_billing == 'off' || $gateway->token_billing == 'optin') ? 'checked' : '' }} />
<span class="ml-1 cursor-pointer">{{ ctrans('texts.no') }}</span>
</label>
</dd>
</div>
@endunless

View File

@ -14,14 +14,16 @@
<div class="container mx-auto grid grid-cols-12">
<div class="col-span-12 lg:col-span-6 lg:col-start-4 overflow-hidden bg-white shadow rounded-lg">
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900">
{{ $card_title }}
</h3>
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
@isset($card_description)
@isset($card_title)
<h3 class="text-lg font-medium leading-6 text-gray-900">
{{ $card_title }}
</h3>
@endisset
@isset($card_description)
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
{{ $card_description }}
@endisset
</p>
</p>
@endisset
</div>
<div>
@yield('gateway_content')