@extends('layouts.admin') @section('breadcrumb') @endsection @section('content')
{{ tr('merchant_access') }}
@csrf
@if($merchant)
{{ tr('merchant_settings') }}
@php $fee_names = [TRANSACTION_FEE , FX_FEE]; $payment_types = [PAYMENT_RAIL_WIRE, PAYMENT_RAIL_SWIFT, PAYMENT_RAIL_ACH]; $fee_types = [FEE_TYPE_FLAT => 'Flat', FEE_TYPE_PERCENTAGE => 'Percent', FEE_TYPE_FIXED => 'Fixed']; $user_types = [USER_TYPE_INDIVIDUAL,USER_TYPE_BUSINESS]; @endphp
@csrf @php $payout_countries = []; $selected_beneficiary_fields = [] ; if ($merchant) { $setting = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'payout_countries') ->first(); $beneficiary_fields = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'beneficiary_fields') ->first(); if ($setting) { $payout_countries = json_decode($setting->value, true) ?? []; } if ($beneficiary_fields) { $selected_beneficiary_fields = json_decode($beneficiary_fields->value, true) ?? []; } $bank_account_id = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'bank_account_id') ->first()->value ?? null; $enable_remitter_deposit = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'enable_remitter_deposit') ->first()->value ?? null; } $enable_accounts = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'enable_accounts') ->first()->value ?? null; $supported_users = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'supported_user_types') ->first()->value ?? null; $business_model = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'business_model') ->first()->value ?? null; $receipt_template = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'receipt_template') ->first()->value ?? null; @endphp
@if($merchant->type == MERCHANT_TYPE_PAYINCOLLECTION)
@endif @if($merchant->type == MERCHANT_TYPE_PAYOUT)
@php $selectedBankAccounts = old( 'bank_account_id', $bank_account_id ? explode(',', $bank_account_id) : [] ); $selectedBankAccounts = array_map('strval', $selectedBankAccounts); @endphp
@endif
@php $beneficiary_fields = App\Helpers\Helper::merchant_beneficiary_form_fields(); @endphp
@php $user = $merchant->user ; $selected_remitter_fields = [] ; $remitter_fields = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->where('key', 'remitter_fields') ->first(); if ($remitter_fields) { $selected_remitter_fields = json_decode($remitter_fields->value, true) ?? []; } $remitter_fields = App\Helpers\Helper::remitter_sender_fields($user); @endphp
@php $settings = \App\Models\MerchantSetting::where('merchant_id', $merchant->id) ->pluck('value', 'key') ->toArray(); $fields = [ 'is_supporting_document_required', 'is_remarks_required', 'is_purpose_of_payment_required', 'is_transaction_reference_no_required', ]; @endphp @foreach ($fields as $field)
@endforeach @php $account_options = [ 'nre' => tr('nre'), 'non_nre' => tr('non_nre'), ]; $selectedAccounts = old( 'supported_accounts', isset($settings['supported_accounts']) ? json_decode($settings['supported_accounts'], true) : [] ); @endphp
@endif @endsection @section('scripts') @endsection