@extends('theme.master') @section('title', __('Checkout')) @section('content') @include('admin.message') @php $gets = App\Breadcum::first(); @endphp @if(isset($gets))
@if($gets['img'] !== NULL && $gets['img'] !== '') @else course @endif

{{ __('Checkout') }}

@endif

{{ __('Your Items') }} (@php if(auth::check()) { $item = App\Cart::where('user_id', Auth::User()->id)->get(); } else { $item = session()->get('cart.add_to_cart'); $item = array_unique($item); } if(count($item)>0){ echo count($item); } else{ echo "0"; } @endphp)


@if(isset($one_course) && $one_course == 1)
@if($cart->id != NULL) @if($cart['preview_image'] !== NULL && $cart['preview_image'] !== '') course @else course @endif @else @if($cart->bundle['preview_image'] !== NULL && $cart->bundle['preview_image'] !== '') blog @else blog @endif @endif
    @if($cart->id != NULL)
  • {{ str_limit($cart->title, $limit =35 , $end = '...') }}
  • @else
  • {{ str_limit($cart->bundle->title, $limit =35 , $end = '...') }}
  • @endif
  • By {{ $cart->user->fname }}
  • @if($cart->discount_price == !NULL)
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($course->discount_price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($course->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • @else
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($course->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • @endif
@else @auth @foreach($carts as $cart)
@if($cart->course_id != NULL) @if($cart->courses['preview_image'] !== NULL && $cart->courses['preview_image'] !== '') course @else course @endif @else @if($cart->bundle['preview_image'] !== NULL && $cart->bundle['preview_image'] !== '') blog @else blog @endif @endif
    @if($cart->course_id != NULL)
  • {{ str_limit($cart->courses->title, $limit =35 , $end = '...') }}
  • @else
  • {{ str_limit($cart->bundle->title, $limit =35 , $end = '...') }}
  • @endif
  • {{ __('By')}} {{ $cart->user->fname }}
  • @if($cart->offer_price == !NULL)
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($cart->offer_price, $from = $currency->code, $to = $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }} {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($cart->price, $from = $currency->code, $to = $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • @else
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($cart->price, $from = $currency->code, $to = $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • @endif
@endforeach @endauth @endif
    @php $currency = App\Currency::where('default', '=', '1')->first(); @endphp {{--
  • {{ __('Total') }}:{{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format(currency($course->discount_price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}

  • --}} {{--
  • {{ activeCurrency()->getData()->position == 'l' ? activeCurrency()->getData()->symbol :'' }}{{ price_format( currency($course->price, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false)) }}{{ activeCurrency()->getData()->position == 'r' ? activeCurrency()->getData()->symbol :'' }}
  • --}}
  • {{ round($offer_percent, 0) }}% Off
  • @php if($cart_total != '' || $cart_total != 0){ $mainpay = round($cart_total,2); }else{ $mainpay = round($cart_total,2); } @endphp
@if(session()->has('changed_currency')) @if(session()->get('changed_currency') !== $currency->code)
({{ __('Equivalent to your currency')}} {{ currency($cart_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = true) }})

@endif @endif @php // $secureamount = $mainpay; $string = currency($cart_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false) ; // @dd(gettype($string)); if(gettype($string) == 'double' || gettype($string) == 'integer'){ $string = round($string,2); $double1 = $string; } else{ $str = preg_replace('/\D/', '', $string); $str1 = $str/100; $double = floatval($str1); $double1 = $double; } // @dd($double1); //print_r($double1); $secureamount = Crypt::encrypt($double1); // @dd(( Crypt::decrypt($secureamount) )); @endphp {{-- @php // $secureamount = $mainpay; $string = currency($cart_total, $from = $currency->code, $to = Session::has('changed_currency') ? Session::get('changed_currency') : $currency->code, $format = false) ; $str = preg_replace('/\D/', '', $string); //$str1 = $str/100; $double = floatval($str); $double1 = $double; //print_r($double1); $secureamount = Crypt::encrypt($double1); //@dd( gettype ( $double1 )); @endphp --}}
@if(isset($cart->bundle->is_subscription_enabled) && $cart->bundle->is_subscription_enabled == '1') @if($gsetting->stripe_enable == 1)
{{ csrf_field() }}
@endif @else @if($gsetting->stripe_enable == 1)
{{ csrf_field() }}
@endif @if($gsetting->paypal_enable == 1)
@csrf
@endif @if($gsetting->instamojo_enable == 1)
{{ csrf_field() }}
{{ __('Name')}}
{{ __('Mobile Number')}}
{{ __('Email Id')}}
@endif @if($gsetting->enable_omise == 1 && $currency->code == 'THB')
@csrf
@endif @if($gsetting->razorpay_enable == 1)
@csrf
@endif @if($gsetting->paystack_enable == 1)
{{ csrf_field() }}

@endif @if($gsetting->paytm_enable == 1)
@csrf
{{ __('Name')}}
{{ __('Mobile Number')}}
{{ __('Email Id')}}
@endif @php $banktransfer = App\BankTransfer::first(); @endphp @if(isset($banktransfer)) @if($banktransfer->bank_enable == '1')
@csrf

({{ __('Please Document') }})

{{ __('bank transfer detail') }}
@php $bankdetail = App\BankTransfer::first(); @endphp
  • {{ __('Account holder name') }}: {{ $bankdetail['account_holder_name'] }}
  • {{ __('Bank Name') }}: {{ $bankdetail['bank_name'] }}
  • {{ __('Bank Acccoun tNumber') }}: {{ $bankdetail['account_number'] }}
  • @if(isset($bankdetail['ifcs_code']))
  • {{ __('IFCS Code') }}: {{ $bankdetail['ifcs_code'] }}
  • @endif @if(isset($bankdetail['swift_code']))
  • {{ __('Swift Code') }}: {{ $bankdetail['swift_code'] }}
  • @endif
@endif @endif @if($gsetting->enable_payu == 1)
@csrf
@endif @if($gsetting->enable_cashfree == 1)
@csrf {{-- --}}
@endif @if($gsetting->enable_moli == 1)
@csrf
@endif @if($gsetting->enable_skrill == 1)
@csrf
@endif @if($gsetting->enable_rave == 1)
@php $array = array(array('metaname' => 'color', 'metavalue' => 'blue'), array('metaname' => 'size', 'metavalue' => 'small')); // print_r($secureamount); @endphp
{{ csrf_field() }}
@endif @php $order_id = uniqid(); @endphp @if($gsetting->enable_payhere == 1)
@if(env('PAYHERE_MODE') == 'sandbox') @php $action = 'https://sandbox.payhere.lk/pay/checkout'; @endphp @else @php $action = 'https://www.payhere.lk/pay/checkout'; @endphp @endif
@endif @php $conversation_id = uniqid(); @endphp @if($gsetting->iyzico_enable == 1)
@csrf
{{ __('Email')}}
{{ __('Mobile Number')}}
{{ __('Identity number')}} {{ __('TCKN for Turkish merchants, passport number for foreign merchants')}}
@endif @if($gsetting->ssl_enable == 1)
@csrf
@endif @php $manualpay = App\ManualPayment::where('status', '1')->get(); @endphp @foreach($manualpay as $manual)

@csrf

({{ __('Please Document') }})


{!! $manual->detail !!}
@if($manual->image != '' && file_exists(public_path().'/images/manualpayment/'.$manual->image) )
{{ $manual->image }}
@endif
@endforeach @if($gsetting->aamarpay_enable == 1)
@php $user_name = Auth::user()->fname; $user_email = Auth::user()->email; $user_mobile = Auth::user()->email; @endphp
{!! aamarpay_post_button([ 'cus_name' => $user_name, // Customer name 'cus_email' => $user_email, // Customer email 'cus_phone' => $user_mobile // Customer Phone ], $mainpay, 'Proceed', 'btn btn-sm btn-primary') !!}
@endif @if($gsetting->braintree_enable == 1)

{{ __('Checkout With Braintree')}}

@csrf
@endif @php $wallet_settings = App\WalletSettings::first(); @endphp @if(isset($wallet_settings) && $wallet_settings->status == 1)

{{ __('Checkout With Wallet') }}

@if(isset(auth()->user()->wallet)) @if(auth()->user()->wallet->status == 1) @if(round(auth()->user()->wallet->balance) >= sprintf("%.2f",Crypt::decrypt(strip_tags($secureamount))))
@csrf
@else

{{ __('Insufficient Wallet Balance') }}

@endif @endif @endif
@endif @if(Module::has('MPesa') && Module::find('MPesa')->isEnabled()) @include('mpesa::front.checkout_form') @endif @if($gsetting->payflexi_enable == 1)
@php $array = array('title' => 'Online Course'); @endphp
{{ csrf_field() }}
@endif @if(Module::has('Esewa') && Module::find('Esewa')->isEnabled()) @include('esewa::front.checkout_form') @endif @if(Module::has('Smanager') && Module::find('Smanager')->isEnabled()) @include('smanager::front.checkout_form') @endif @if(Module::has('Paytab') && Module::find('Paytab')->isEnabled()) @include('paytab::front.checkout_form') @endif @if(Module::has('DPOPayment') && Module::find('DPOPayment')->isEnabled()) @include('dpopayment::front.checkout_form') @endif @if(Module::has('AuthorizeNet') && Module::find('AuthorizeNet')->isEnabled()) @include('authorizenet::front.checkout_form') @endif @if(Module::has('Bkash') && Module::find('Bkash')->isEnabled()) @include('bkash::front.checkout_form') @endif @if(Module::has('Midtrains') && Module::find('Midtrains')->isEnabled()) @include('midtrains::front.checkout_form') @endif @if(Module::has('SquarePay') && Module::find('SquarePay')->isEnabled()) @include('squarepay::front.checkout_form') @endif @if(Module::has('Worldpay') && Module::find('Worldpay')->isEnabled()) @include('worldpay::front.checkout_form') @endif @if(Module::has('Onepay') && Module::find('Onepay')->isEnabled()) @include('onepay::front.checkout_form') @endif @endif
@endsection @section('custom-script') {{-- --}} @stack('custom-script') @if($gsetting->braintree_enable == 1) @php $gateway = new Braintree\Gateway([ 'environment' => env('BRAINTREE_ENV'), 'merchantId' => env('BRAINTREE_MERCHANT_ID'), 'publicKey' => env('BRAINTREE_PUBLIC_KEY'), 'privateKey' => env('BRAINTREE_PRIVATE_KEY'), ]); $token = $gateway->ClientToken()->generate(); @endphp @endif @if(config('bkash.ENABLE') == 1 && Module::has('Bkash') && Module::find('Bkash')->isEnabled()) @include("bkash::front.bkashscript") @endif @if(env('MID_TRANS_ENABLE') == 1 && Module::has('Midtrains') && Module::find('Midtrains')->isEnabled()) @include("midtrains::front.midtrans_script") @endif @endsection