@extends('admin.layout') @section('content')

{{ translate('Paypal') }}

@php $today_date = \Carbon\Carbon::now(); $expire_date = \Carbon\Carbon::createFromFormat('Y-m-d', date('Y-m-d', strtotime('+30 day', strtotime(\App\Addon::where('type', 'Paypal_purchase_date')->first()->value)))); $data_difference = $today_date->diffInDays($expire_date, false); //false param @endphp
@if (($addon_manager['payment_type'] == 'one_time' && \App\Addon::where('type', 'Paypal_purchase_date')->first()->value != null) || ($addon_manager['payment_type'] == 'per_month' && $data_difference >= 0) || $addon_manager['price'] == 0)
{{ translate('Paypal integration data') }}
{!! Form::open(['method' => 'post', 'action' => 'Admin\Addons\PaypalController@updatePaypalConf', 'files' => true, 'id' => 'update_paypal_conf_form']) !!}
{!! Form::checkbox('Paypal_active', null, $newaddons['Paypal_active'], ['id' => 'Checkbox_1']) !!}
{!! Form::checkbox('Paypal_sandbox', null, $newaddons['Paypal_sandbox'], ['id' => 'Checkbox_2']) !!}
{!! Form::text('Paypal_client_id', $newaddons['Paypal_client_id'], ['id' => 'Paypal_client_id', 'class' => 'form-control', 'placeholder' => translate('Client id')]) !!}
{!! Form::text('Paypal_client_secret', $newaddons['Paypal_client_secret'], ['id' => 'Paypal_client_secret', 'class' => 'form-control', 'placeholder' => translate('Client secret')]) !!}
{!! Form::text('Paypal_order_description', $newaddons['Paypal_order_description'], ['class' => 'form-control', 'placeholder' => translate('Order description')]) !!}
{!! Form::Close() !!}
@else

{{ translate('You dont purchase this item or require to renew this item subscribtion') }}

{{ translate('Add to cart') }}

@endif
@endsection @section('script') @endsection