@extends('accounts.nav')
@section('content')
@parent
{{ Former::open()->addClass('col-md-8 col-md-offset-2 warn-on-exit') }}
{{ Former::populate($account) }}
{{ Former::legend('Payment Gateway') }}
@if ($accountGateway)
{{ Former::populateField('gateway_id', $accountGateway->gateway_id) }}
{{ Former::populateField('recommendedGateway_id', $accountGateway->gateway_id) }}
@foreach ($accountGateway->fields as $field => $junk)
@if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName']))
{{-- do nothing --}}
@else
{{ Former::populateField($accountGateway->gateway_id.'_'.$field, $config->$field) }}
@endif
@endforeach
@endif
{{ Former::checkboxes('creditCardType_id')
->label('Accepted Credit Cards')
->checkboxes($creditCardTypes)
->class('creditcard-types')
}}
{{ Former::radios('recommendedGateway_id')->label('Recommended Gateways')
->radios($recommendedGateways)->class('recommended-gateway')
}}
{{ Former::select('gateway_id')->label('PayPal & Other Gateways')->addOption('', '')
->dataClass('gateway-dropdown')
->fromQuery($dropdownGateways, 'name', 'id')
->onchange('setFieldsShown()'); }}
@foreach ($gateways as $gateway)
@foreach ($gateway->fields as $field => $details)
@if (in_array($field, ['solutionType', 'landingPage', 'headerImageUrl', 'brandName']))
{{-- do nothing --}}
@elseif ($field == 'testMode' || $field == 'developerMode')
{{-- Former::checkbox($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field))->text('Enable') --}}
@elseif ($field == 'username' || $field == 'password')
{{ Former::text($gateway->id.'_'.$field)->label('API '. ucfirst(Utils::toSpaceCase($field))) }}
@else
{{ Former::text($gateway->id.'_'.$field)->label(Utils::toSpaceCase($field)) }}
@endif
@endforeach
@endforeach
{{ Former::actions( Button::lg_success_submit('Save')->append_with_icon('floppy-disk') ) }}
{{ Former::close() }}
@stop