@extends('public.header') @section('head') @parent @if (!empty($braintreeClientToken)) @include('payments.tokenization_braintree') @elseif (isset($accountGateway) && $accountGateway->getPublishableStripeKey()) @include('payments.tokenization_stripe') @elseif (isset($accountGateway) && $accountGateway->gateway_id == GATEWAY_WEPAY && $paymentType != PAYMENT_TYPE_WEPAY_ACH) @include('payments.tokenization_wepay') @else @endif @stop @section('content') @include('payments.payment_css') @if($paymentType == PAYMENT_TYPE_STRIPE_ACH) {!! Former::open($url) ->autocomplete('on') ->addClass('payment-form') ->id('payment-form') ->rules(array( 'first_name' => 'required', 'last_name' => 'required', 'account_number' => 'required', 'routing_number' => 'required', 'account_holder_name' => 'required', 'account_holder_type' => 'required', 'authorize_ach' => 'required', )) !!} @else {!! Former::vertical_open($url) ->autocomplete('on') ->addClass('payment-form') ->id('payment-form') ->rules(array( 'first_name' => 'required', 'last_name' => 'required', 'card_number' => 'required', 'expiration_month' => 'required', 'expiration_year' => 'required', 'cvv' => 'required', 'address1' => 'required', 'city' => 'required', 'state' => 'required', 'postal_code' => 'required', 'country_id' => 'required', 'phone' => 'required', 'email' => 'required|email', 'authorize_ach' => 'required', 'tos_agree' => 'required', )) !!} @endif @if ($client) {{ Former::populate($client) }} {{ Former::populateField('first_name', $contact->first_name) }} {{ Former::populateField('last_name', $contact->last_name) }} {{ Former::populateField('email', $contact->email) }} @if (!$client->country_id && $client->account->country_id) {{ Former::populateField('country_id', $client->account->country_id) }} @endif @if (!$client->currency_id && $client->account->currency_id) {{ Former::populateField('currency_id', $client->account->currency_id) }} {{ Former::populateField('currency', $client->account->currency->code) }} @endif @endif @if (Utils::isNinjaDev()) {{ Former::populateField('first_name', 'Test') }} {{ Former::populateField('last_name', 'Test') }} {{ Former::populateField('address1', '350 5th Ave') }} {{ Former::populateField('city', 'New York') }} {{ Former::populateField('state', 'NY') }} {{ Former::populateField('postal_code', '10118') }} {{ Former::populateField('country_id', 840) }} @endif

 

@if ($client && isset($invoiceNumber))

{{ $client->getDisplayName() }}

{{ trans('texts.invoice') . ' ' . $invoiceNumber }}|  {{ trans('texts.amount_due') }}: {{ $account->formatMoney($amount, $client, true) }}

@elseif ($paymentTitle)

{{ $paymentTitle }} @if(isset($paymentSubtitle))
{{ $paymentSubtitle }} @endif

@endif
@if (Request::secure() || Utils::isNinjaDev())

{{ trans('texts.secure_payment') }}

{{ trans('texts.256_encryption') }}
@endif

 
 

@if($paymentType != PAYMENT_TYPE_STRIPE_ACH && $paymentType != PAYMENT_TYPE_BRAINTREE_PAYPAL && $paymentType != PAYMENT_TYPE_WEPAY_ACH)

{{ trans('texts.contact_information') }}

{!! Former::text('first_name') ->placeholder(trans('texts.first_name')) ->label('') !!}
{!! Former::text('last_name') ->placeholder(trans('texts.last_name')) ->autocomplete('family-name') ->label('') !!}
{!! Former::text('email') ->placeholder(trans('texts.email')) ->autocomplete('email') ->label('') !!}

 
 

@if (!empty($showAddress))

{{ trans('texts.billing_address') }} {{ trans('texts.payment_footer1') }}

{!! Former::text('address1') ->autocomplete('address-line1') ->placeholder(trans('texts.address1')) ->label('') !!}
{!! Former::text('address2') ->autocomplete('address-line2') ->placeholder(trans('texts.address2')) ->label('') !!}
{!! Former::text('city') ->autocomplete('address-level2') ->placeholder(trans('texts.city')) ->label('') !!}
{!! Former::text('state') ->autocomplete('address-level1') ->placeholder(trans('texts.state')) ->label('') !!}
{!! Former::text('postal_code') ->autocomplete('postal-code') ->placeholder(trans('texts.postal_code')) ->label('') !!}
{!! Former::select('country_id') ->placeholder(trans('texts.country_id')) ->fromQuery($countries, 'name', 'id') ->addGroupClass('country-select') ->label('') !!}

 
 

@endif

{{ trans('texts.billing_method') }}

@endif @if($paymentType == PAYMENT_TYPE_STRIPE_ACH) @if($accountGateway->getPlaidEnabled()) @endif
@if($accountGateway->getPlaidEnabled())
{{ trans('texts.or') }}

{{ trans('texts.link_manually') }}

@endif

{{ trans('texts.ach_verification_delay_help') }}

{!! Former::radios('account_holder_type')->radios(array( trans('texts.individual_account') => array('value' => 'individual'), trans('texts.company_account') => array('value' => 'company'), ))->inline()->label(trans('texts.account_holder_type')); !!} {!! Former::text('account_holder_name') ->label(trans('texts.account_holder_name')) !!} {!! Former::select('country_id') ->label(trans('texts.country_id')) ->fromQuery($countries, 'name', 'id') ->addGroupClass('country-select') !!} {!! Former::select('currency') ->label(trans('texts.currency_id')) ->fromQuery($currencies, 'name', 'code') ->addGroupClass('currency-select') !!} {!! Former::text('') ->id('routing_number') ->label(trans('texts.routing_number')) !!}
{!! Former::text('') ->id('account_number') ->label(trans('texts.account_number')) !!} {!! Former::text('') ->id('confirm_account_number') ->label(trans('texts.confirm_account_number')) !!}
{!! Former::checkbox('authorize_ach') ->text(trans('texts.ach_authorization', ['company'=>$account->getDisplayName(), 'email' => $account->work_email])) ->label(' ') !!}
{!! Button::success(strtoupper(trans('texts.add_account'))) ->submit() ->withAttributes(['id'=>'add_account_button']) ->large() !!} @if($accountGateway->getPlaidEnabled() && !empty($amount)) {!! Button::success(strtoupper(trans('texts.pay_now') . ' - ' . $account->formatMoney($amount, $client, true) )) ->submit() ->withAttributes(['style'=>'display:none', 'id'=>'pay_now_button']) ->large() !!} @endif
@elseif($paymentType == PAYMENT_TYPE_BRAINTREE_PAYPAL)

{{ trans('texts.paypal') }}

{{$details->firstName}} {{$details->lastName}}
{{$details->email}}

 

@if (isset($amount) && $client && $account->showTokenCheckbox()) selectTokenCheckbox() ? 'CHECKED' : '' }} value="1" style="margin-left:0px; vertical-align:top"> {!! trans('texts.token_billing_secure', ['link' => link_to('https://www.braintreepayments.com/', 'Braintree', ['target' => '_blank'])]) !!} @endif

 

@if(isset($amount)) {!! Button::success(strtoupper(trans('texts.pay_now') . ' - ' . $account->formatMoney($amount, $client, true) )) ->submit() ->large() !!} @else {!! Button::success(strtoupper(trans('texts.add_paypal_account') )) ->submit() ->large() !!} @endif
@elseif($paymentType == PAYMENT_TYPE_WEPAY_ACH)

{{ trans('texts.bank_account') }}

@if (!empty($details))
{{$details->bank_account_name}}
•••••{{$details->bank_account_last_four}}
@endif {!! Former::checkbox('authorize_ach') ->text(trans('texts.ach_authorization', ['company'=>$account->getDisplayName(), 'email' => $account->work_email])) ->label(' ') !!} {!! Former::checkbox('tos_agree') ->text(trans('texts.wepay_payment_tos_agree', [ 'terms' => ''.trans('texts.terms_of_service').'', 'privacy_policy' => ''.trans('texts.privacy_policy').'', ])) ->help(trans('texts.payment_processed_through_wepay')) ->label(' ') !!}

 

@if(isset($amount) && empty($paymentMethodPending)) {!! Button::success(strtoupper(trans('texts.pay_now') . ' - ' . $account->formatMoney($amount, $client, true) )) ->submit() ->large() !!} @else {!! Button::success(strtoupper(trans('texts.add_bank_account') )) ->submit() ->large() !!} @endif
@else
@if (!empty($braintreeClientToken))
@else {!! Former::text(!empty($tokenize) ? '' : 'card_number') ->id('card_number') ->placeholder(trans('texts.card_number')) ->autocomplete('cc-number') ->label('') !!} @endif
@if (!empty($braintreeClientToken))
@else {!! Former::text(!empty($tokenize) ? '' : 'cvv') ->id('cvv') ->placeholder(trans('texts.cvv')) ->autocomplete('off') ->label('') !!} @endif
@if (!empty($braintreeClientToken))
@else {!! Former::select(!empty($tokenize) ? '' : 'expiration_month') ->id('expiration_month') ->autocomplete('cc-exp-month') ->placeholder(trans('texts.expiration_month')) ->addOption('01 - January', '1') ->addOption('02 - February', '2') ->addOption('03 - March', '3') ->addOption('04 - April', '4') ->addOption('05 - May', '5') ->addOption('06 - June', '6') ->addOption('07 - July', '7') ->addOption('08 - August', '8') ->addOption('09 - September', '9') ->addOption('10 - October', '10') ->addOption('11 - November', '11') ->addOption('12 - December', '12')->label('') !!} @endif
@if (!empty($braintreeClientToken))
@else {!! Former::select(!empty($tokenize) ? '' : 'expiration_year') ->id('expiration_year') ->autocomplete('cc-exp-year') ->placeholder(trans('texts.expiration_year')) ->addOption('2016', '2016') ->addOption('2017', '2017') ->addOption('2018', '2018') ->addOption('2019', '2019') ->addOption('2020', '2020') ->addOption('2021', '2021') ->addOption('2022', '2022') ->addOption('2023', '2023') ->addOption('2024', '2024') ->addOption('2025', '2025') ->addOption('2026', '2026')->label('') !!} @endif
@if (isset($amount) && $client && $account->showTokenCheckbox($storageGateway/* will contain gateway id */)) selectTokenCheckbox() ? 'CHECKED' : '' }} value="1" style="margin-left:0px; vertical-align:top"> @if ($storageGateway == GATEWAY_STRIPE) {!! trans('texts.token_billing_secure', ['link' => link_to('https://stripe.com/', 'Stripe.com', ['target' => '_blank'])]) !!} @elseif ($storageGateway == GATEWAY_BRAINTREE) {!! trans('texts.token_billing_secure', ['link' => link_to('https://www.braintreepayments.com/', 'Braintree', ['target' => '_blank'])]) !!} @endif @endif
@if (isset($acceptedCreditCardTypes))
@foreach ($acceptedCreditCardTypes as $card) {{ $card['alt'] }} @endforeach
@endif

 

@if(isset($amount)) {!! Button::success(strtoupper(trans('texts.pay_now') . ' - ' . $account->formatMoney($amount, $client, true) )) ->submit() ->large() !!} @else {!! Button::success(strtoupper(trans('texts.add_credit_card') )) ->submit() ->large() !!} @endif

 

@endif

 

 

{!! Former::close() !!} @if (isset($accountGateway) && $accountGateway->getPlaidEnabled()) @endif @stop