This commit is contained in:
karneaud 2024-06-23 22:30:28 -04:00
parent 3d36cb917f
commit 2a3fb70fd2
24 changed files with 0 additions and 862 deletions

View File

@ -1,55 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\DataProviders;
final class CAProvinces {
/**
* The provinces and territories of Canada
*
* @var array
*/
protected static $provinces = [
'AB' => 'Alberta',
'BC' => 'British Columbia',
'MB' => 'Manitoba',
'NB' => 'New Brunswick',
'NL' => 'Newfoundland And Labrador',
'NS' => 'Nova Scotia',
'ON' => 'Ontario',
'PE' => 'Prince Edward Island',
'QC' => 'Quebec',
'SK' => 'Saskatchewan',
'NT' => 'Northwest Territories',
'NU' => 'Nunavut',
'YT' => 'Yukon'
];
/**
* Get the name of the province or territory for a given abbreviation.
*
* @param string $abbreviation
* @return string
*/
public static function getName($abbreviation) {
return self::$provinces[$abbreviation];
}
/**
* Get all provinces and territories.
*
* @return array
*/
public static function get() {
return self::$provinces;
}
/**
* Get the abbreviation for a given province or territory name.
*
* @param string $name
* @return string
*/
public static function getAbbreviation($name) {
return array_search(ucwords($name), self::$provinces);
}
}

View File

@ -1,19 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\DataProviders;
use Omnipay\Rotessa\Object\Frequency;
final class Frequencies
{
public static function get() : array {
return Frequency::getTypes();
}
public static function getFromType() {
}
public static function getOnePayment() {
return Frequency::ONCE;
}
}

View File

@ -1,11 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\Events;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
class CacheGateways
{
use SerializesModels, Dispatchable;
}

View File

@ -1,6 +0,0 @@
<?php
include app_path("PaymentDrivers/Rotessa/vendor/autoload.php");
class_alias("App\\PaymentDrivers\\Rotessa\\PaymentMethod","App\\PaymentDrivers\\Rotessa\\BankTransfer");
class_alias("App\\PaymentDrivers\\Rotessa\\PaymentMethod","App\\PaymentDrivers\\Rotessa\\Acss");

View File

@ -1,28 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\Listeners;
use App\Models\Gateway;
use Illuminate\Support\Facades\Cache;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\PaymentDrivers\Rotessa\Events\CacheGateways as Event;
use App\PaymentDrivers\Rotessa\Models\Gateway as RotessaGateway;
class CacheGateways
{
public function handle(Event $event)
{
$gateways = Cache::get('gateways');
if (empty($gateways) || $gateways->where('name', 'Rotessa')->isEmpty()) {
$gateways = Gateway::orderBy('id')->get();
}
$gateways = $gateways->map(fn($item) => $item->name == 'Rotessa'? RotessaGateway::find($item->toArray()['id']) : $item );
Cache::forever('gateways', $gateways);
}
}

View File

@ -1,23 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Models\Gateway as BaseGateway;
class Gateway extends BaseGateway
{
public function getOptionsAttribute()
{
$gateway_types = config('rotessa.gateway_types');
$options = parent::getOptionsAttribute();
if($this->name == 'Rotessa' && empty($options)) {
$options = $gateway_types;
}
return $options;
}
}

View File

@ -1,21 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\Providers;
use App\PaymentDrivers\Rotessa\Events\CacheGateways as Event;
use App\PaymentDrivers\Rotessa\Listeners\CacheGateways as Listener;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
Event::class => [
Listener::class,
],
];
}

View File

@ -1,83 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\Providers;
use Illuminate\Support\Facades\Blade;
use App\PaymentDrivers\Rotessa\Events\CacheGateways;
use Illuminate\Support\ServiceProvider as BaseProvider;
class ServiceProvider extends BaseProvider
{
protected string $moduleName = 'Rotessa';
protected string $moduleNameLower = 'rotessa';
/**
* Boot the application events.
*/
public function boot(): void
{
include __DIR__ . "/../Helpers/helpers.php";
$this->registerConfig();
$this->registerTranslations();
$this->registerViews();
event(new CacheGateways);
}
/**
* Register config.
*/
protected function registerConfig(): void
{
$this->mergeConfigFrom(app_path("PaymentDrivers/{$this->moduleName}/config/gateway_types.php"),$this->moduleNameLower);
}
/**
* Register the service provider.
*/
public function register(): void
{
$this->app->register(EventServiceProvider::class);
}
/**
* Register translations.
*/
public function registerTranslations(): void
{
$langPath = resource_path('lang/modules/'.$this->moduleNameLower);
if (is_dir($langPath)) {
$this->loadTranslationsFrom($langPath, $this->moduleNameLower);
$this->loadJsonTranslationsFrom($langPath);
} else {
$this->loadTranslationsFrom(app_path("PaymentDrivers/{$this->moduleName}resources/lang"), $this->moduleNameLower);
$this->loadJsonTranslationsFrom(app_path("PaymentDrivers/{$this->moduleName}resources/lang"));
}
}
/**
* Register views.
*/
public function registerViews(): void
{
$viewPath = resource_path('views/portal/ninja2020/gateways/'.$this->moduleNameLower);
$sourcePath = app_path('PaymentDrivers/Rotessa/resources/views/gateways/rotessa');
$this->loadViewsFrom(array_merge($this->getPublishableViewPaths(), [$sourcePath]), $this->moduleNameLower);
Blade::componentNamespace('App\\PaymentDrivers\\Rotessa\\View\\Components', $this->moduleNameLower);
}
private function getPublishableViewPaths(): array
{
$paths = [app_path('PaymentDrivers/Rotessa/resources/views/gateways/rotessa')];
foreach (config('view.paths') as $path) {
if (is_dir($path.'/'.$this->moduleNameLower)) {
$paths[] = $path.'/'.$this->moduleNameLower;
}
}
return $paths;
}
}

View File

@ -1,118 +0,0 @@
<?php
namespace App\PaymentDrivers\Rotessa\View\Components;
use App\PaymentDrivers\Rotessa\DataProviders\CAProvinces;
use App\DataProviders\USStates;
use Illuminate\View\Component;
use Illuminate\Support\Arr;
use Illuminate\View\View;
// Contact Component
class ContactComponent extends Component
{
public array $contact;
public function __construct(array $contact) {
$this->contact = $contact;
$this->attributes = $this->newAttributeBag(Arr::only($this->contact, $this->fields) );
}
private $fields = [
'name',
'email',
'home_phone',
'phone',
'custom_identifier',
'customer_type' ,
'id'
];
private $defaults = [
'customer_type' => "Business",
'customer_identifier' => null,
'id' => null
];
public function render()
{
return $this->view('rotessa::components.contact', $this->attributes->getAttributes(), $this->defaults );
}
}
// Address Component
class AddressComponent extends Component
{
private $fields = [
'address_1',
'address_2',
'city',
'postal_code',
'province_code',
'country'
];
private $defaults = [
'country' => 'US'
];
public array $address;
public function __construct(array $address) {
$this->address = $address;
if(strlen($this->address['state']) > 2 ) {
$this->address['state'] = $this->address['country'] == 'US' ? array_search($this->address['state'], USStates::$states) : CAProvinces::getAbbreviation($this->address['state']);
}
$this->attributes = $this->newAttributeBag(
Arr::only(Arr::mapWithKeys($this->address, function ($item, $key) {
return in_array($key, ['address1','address2','state'])?[ (['address1'=>'address_1','address2'=>'address_2','state'=>'province_code'])[$key] => $item ] :[ $key => $item ];
}),
$this->fields) );
}
public function render()
{
return $this->view('rotessa::components.address', $this->attributes->getAttributes(), $this->defaults );
}
}
// AmericanBankInfo Component
class AccountComponent extends Component
{
private $fields = [
'bank_account_type',
'routing_number',
'institution_number',
'transit_number',
'bank_name',
'country',
'account_number'
];
private $defaults = [
'bank_account_type' => null,
'routing_number' => null,
'institution_number' => null,
'transit_number' => null,
'bank_name' => ' ',
'account_number' => null,
'country' => 'US',
"authorization_type" => 'Online'
];
public array $account;
public function __construct(array $account) {
$this->account = $account;
$this->attributes = $this->newAttributeBag(Arr::only($this->account, $this->fields) );
}
public function render()
{
return $this->view('rotessa::components.account', $this->attributes->getAttributes(), $this->defaults );
}
}

View File

@ -1,16 +0,0 @@
<?php
use App\PaymentDrivers\Rotessa\DataProviders\CAProvinces;
use Illuminate\Support\Facades\View;
use App\DataProviders\USStates;
View::composer(['rotessa::components.address','rotessa::components.banks.US.bank','rotessa::components.dropdowns.country.US'], function ($view) {
$states = USStates::get();
$view->with('states', $states);
});
// CAProvinces View Composer
View::composer(['rotessa::components.address','rotessa::components.banks.CA.bank','rotessa::components.dropdowns.country.CA'], function ($view) {
$provinces = CAProvinces::get();
$view->with('provinces', $provinces);
});

View File

@ -1,61 +0,0 @@
{
"name": "karneaud/invoiceninja-rotessa",
"description": "Invoice Ninja with Rotessa gateway",
"type":"laravel-module",
"keywords": [
"invoice ninja",
"laravel",
"rotessa"
],
"license": ["Attribution Assurance License","Proprietary License","BSD 3-Clause License"],
"authors": [
{
"name": "Kendall Arneaud",
"email": "kendall.arneaud@gmail.com"
}
],
"autoload": {
"classmap": ["./View/Components/Components.php"],
"psr-4": {
"App\\PaymentDrivers\\Rotessa\\":"./",
"App\\PaymentDrivers\\Rotessa\\View\\Components\\":"./View/Components/",
"App\\PaymentDrivers\\Rotessa\\Database\\Seeders\\": "Database/Seeders/"
},
"files": [
"./View/Composers/Composer.php"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"repositories": [
{
"type": "package",
"package": {
"name": "karneaud/omnipay-rotessa",
"source": {
"url": "https://github.com/karneaud/omnipay-rotessa.git",
"type": "git",
"reference": "master"
},
"version": "1.0.0-beta",
"dist": {
"url": "https://github.com/karneaud/omnipay-rotessa/archive/refs/tags/v1.0.0-beta.zip",
"type": "zip"
},
"autoload": {
"psr-4": {
"Omnipay\\Rotessa\\":"./src/Omnipay/Rotessa/",
"Omnipay\\Rotessa\\Exception\\":"./src/Omnipay/Rotessa/Exception/"
},
"classmap": ["./src/Omnipay/Rotessa/Exception/Exceptions.php"]
}
}
}
],
"require": {
"karneaud/omnipay-rotessa": "v1.0.0-beta"
}
}

View File

@ -1,44 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "4c8b93bd9cd92f484502fc665fdbe826",
"packages": [
{
"name": "karneaud/omnipay-rotessa",
"version": "1.0.0-beta",
"source": {
"type": "git",
"url": "https://github.com/karneaud/omnipay-rotessa.git",
"reference": "master"
},
"dist": {
"type": "zip",
"url": "https://github.com/karneaud/omnipay-rotessa/archive/refs/tags/v1.0.0-beta.zip"
},
"type": "library",
"autoload": {
"psr-4": {
"Omnipay\\Rotessa\\": "./src/Omnipay/Rotessa/",
"Omnipay\\Rotessa\\Exception\\": "./src/Omnipay/Rotessa/Exception/"
},
"classmap": [
"./src/Omnipay/Rotessa/Exception/Exceptions.php"
]
}
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"karneaud/omnipay-rotessa": 10
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.6.0"
}

View File

@ -1,16 +0,0 @@
<?php
use App\Models\GatewayType;
return [
'gateway_types' => [
GatewayType::BANK_TRANSFER => [
'refund' => false,
'token_billing' => true,
'webhooks' => [],
],
//GatewayType::BACS => ['refund' => false, 'token_billing' => true, 'webhooks' => []],
//GatewayType::DIRECT_DEBIT => ['refund' => false, 'token_billing' => true, 'webhooks' => []],
GatewayType::ACSS => ['refund' => false, 'token_billing' => true, 'webhooks' => []]
]
];

View File

@ -1,4 +0,0 @@
<dd> Gateway: </dd>
<dt>{{ $brand }}</dt>
<dd> Account Number: </dd>
<dt>{{ $account_number }}</dt>

View File

@ -1,35 +0,0 @@
@extends('portal.ninja2020.layout.payments', ['gateway_title' => $gateway->company_gateway->label, 'card_title' =>\App\Models\GatewayType::getAlias($gateway_type_id )])
@section('gateway_content')
@if(session()->has('ach_error'))
<div class="alert alert-failure mb-4">
<p>{{ session('ach_error') }}</p>
</div>
@endif
<form action="{{ route('client.payment_methods.store', ['method' => $gateway_type_id ]) }}"
method="post" id="server_response">
@csrf
<input type="hidden" name="company_gateway_id" value="{{ $gateway->company_gateway->id }}">
<input type="hidden" name="gateway_type_id" value="{{ $gateway_type_id }}">
<input type="hidden" name="gateway_response" id="gateway_response">
<input type="hidden" name="is_default" id="is_default">
<x-rotessa::contact-component :contact="$contact"></x-rotessa::contact-component>
<x-rotessa::address-component :address="$address"></x-rotessa::address-component>
<x-rotessa::account-component :account="$account"></x-rotessa::account-component>
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'authorize-bank-account', 'type' => 'submit'])
{{ ctrans('texts.add_payment_method') }}
@endcomponent
</form>
<div class="alert alert-failure mb-4" hidden id="errors"></div>
@endsection
@section('gateway_footer')
@endsection

View File

@ -1,91 +0,0 @@
@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Direct Debit', 'card_title' => 'Direct Debit'])
@section('gateway_content')
@if (count($tokens) > 0)
<div class="alert alert-failure mb-4" hidden id="errors"></div>
@include('portal.ninja2020.gateways.includes.payment_details')
<form action="{{ route('client.payments.response') }}" method="post" id="server-response">
@csrf
<input type="hidden" name="company_gateway_id" value="{{ $gateway->getCompanyGatewayId() }}">
<input type="hidden" name="payment_method_id" value="{{ $payment_method_id }}">
<input type="hidden" name="source" value="">
<input type="hidden" name="amount" value="{{ $amount }}">
<input type="hidden" name="currency" value="{{ $currency }}">
<input type="hidden" name="payment_hash" value="{{ $payment_hash }}">
<input type="hidden" name="token_id" value="">
<input type="hidden" name="frequency" value="Once">
<input type="hidden" name="installments" value="1">
<input type="hidden" name="comment" value="Payment for invoice # {{ $invoice_nums }}">
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')])
@if (count($tokens) > 0)
@foreach ($tokens as $token)
<label class="mr-4">
<input type="radio" data-token="{{ $token->token }}" data-token_id="{{ $token->id }}" name="payment-type"
class="form-radio cursor-pointer toggle-payment-with-token" />
<span class="ml-1 cursor-pointer">
{{ App\Models\GatewayType::getAlias($token->gateway_type_id) }} ({{ $token->meta->brand }})
&nbsp; Acc#: {{ $token->meta->account_number }}
</span>
</label><br/>
@endforeach
@endisset
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Process Date
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input autocomplete="new-password" readonly type="date" min="{{ $due_date }}" name="process_date" id="process_date" required class="input w-full" placeholder="" value="{{ old('process_date', $process_date ) }}">
</dd>
{{--
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Insallments
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="installments" name="installments" type="number" placeholder="Installments" required value="{{ old('installments',$installments) }}">
</dd>
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Frequency
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="frequency" name="frequency" type="text" placeholder="Once/Weekly/Monthly/Annually" required >
</dd>
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Comments
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<textarea autocomplete="new-password" id="comment" name="comment" type="text" class="w-full py-2 px-3 rounded text-sm disabled:opacity-75 disabled:cursor-not-allowed undefined border border-gray-300" placeholder="" rows="5" style="background-color: rgb(255, 255, 255); border-color: rgb(209, 213, 219); color: rgb(42, 48, 61);"> </textarea>
</dd> --}}
@endcomponent
</form>
@else
@component('portal.ninja2020.components.general.card-element-single', ['title' => 'Direct Debit', 'show_title' => false])
<span>{{ ctrans('texts.bank_account_not_linked') }}</span>
<a class="button button-link text-primary"
href="{{ route('client.payment_methods.index') }}">{{ ctrans('texts.add_payment_method') }}</a>
@endcomponent
@endif
@if (count($tokens) > 0)
@include('portal.ninja2020.gateways.includes.pay_now')
@endif
@endsection
@push('footer')
<script>
Array
.from(document.getElementsByClassName('toggle-payment-with-token'))
.forEach((element) => element.addEventListener('click', (element) => {
document.querySelector('input[name=source]').value = element.target.dataset.token;
document.querySelector('input[name=token_id]').value = element.target.dataset.token_id;
}));
document.getElementById('pay-now').addEventListener('click', function() {
document.getElementById('server-response').submit();
});
</script>
@endpush

View File

@ -1,31 +0,0 @@
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900">
Account Information
</h3>
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
Enter the information for the bank account
</p>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Bank Name
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="bank_name" name="bank_name" type="text" placeholder="Bank Name" required value="{{ old('bank_name', $bank_name) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Account Number
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="account_number" name="account_number" type="text" placeholder="Account Number" required value="{{ old('account_number', $account_number) }}">
</dd>
</div>
<input type="hidden" name="authorization_type" id="authorization_type" value="{{ old('authorization_type',$authorization_type) }}" >
@include("rotessa::components.banks.$country.bank", compact('bank_account_type','routing_number','institution_number','transit_number'))

View File

@ -1,62 +0,0 @@
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900">
Address Information
</h3>
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
Enter the address information for the account holder
</p>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Address Line 1
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="address_1" name="address_1" type="text" placeholder="Address Line 1" required value="{{ old('address_1', $address_1) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Address Line 2
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="address_2" name="address_2" type="text" placeholder="Address Line 2" required value="{{ old('address_2', $address_2) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
City
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="city" name="city" type="text" placeholder="City" required value="{{ old('city', $city) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Postal Code
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="postal_code" name="postal_code" type="text" placeholder="Postal Code" required value="{{ old('postal_code', $postal_code ) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Country
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
@if('US' == $country)
<input type="radio" id="us" name="country" value="US" required @checked(old('country', $country) == 'US')>
<label for="us">United States</label><br>
@else
<input type="radio" id="ca" name="country" value="CA" required @checked(old('country', $country) == 'CA')>
<label for="ca">Canada</label><br>
@endif
</dd>
</div>
@include("rotessa::components.dropdowns.country.$country",compact('province_code'))

View File

@ -1,17 +0,0 @@
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Transit Number
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="transit_number" max="5" name="transit_number" type="text" placeholder="Transit Number" required value="{{ old('transit_number',$transit_number) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Institution Number
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="institution_number" max="3" name="institution_number" type="text" placeholder="Institution Number" required value="{{ old('institution_number',$institution_number) }}">
</dd>
</div>

View File

@ -1,28 +0,0 @@
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Routing Number
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="routing_number" name="routing_number" type="text" placeholder="Routing Number" required value="{{ old('routing_number',$routing_number) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Account Type
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<div class="sm:grid-cols-2 sm:flex">
<div class="flex items-center px-2">
<input id="bank_account_type_savings" name="bank_account_type" value="Savings" required @checked(old('bank_account_type', $bank_account_type)) type="radio" class="focus:ring-gray-500 h-4 w-4 border-gray-300 disabled:opacity-75 disabled:cursor-not-allowed">
<label for="bank_account_type_savings" class="ml-3 block text-sm font-medium cursor-pointer">Savings</label>
</div>
<div class="flex items-center px-2">
<input id="bank_account_type_checking" name="bank_account_type" value="Checking" required @checked(old('bank_account_type', $bank_account_type)) type="radio" class="focus:ring-gray-500 h-4 w-4 border-gray-300 disabled:opacity-75 disabled:cursor-not-allowed">
<label for="bank_account_type_checking" class="ml-3 block text-sm font-medium cursor-pointer">Checking</label>
</div>
</div>
</dd>
</div>

View File

@ -1,69 +0,0 @@
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900">
Account Holder Information
</h3>
<p class="max-w-2xl mt-1 text-sm leading-5 text-gray-500">
Enter the information for the account holder
</p>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Full Name
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="name" name="name" type="text" placeholder="Full Name" required value="{{ old('name',$name) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Email Address
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" name="email" id="email" type="email" placeholder="Email Address" required value="{{ old('email',$email) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Home Phone
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="home_phone" name="home_phone" type="text" placeholder="Home Phone" required value="{{ old('phone',$phone) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Other Phone
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<input class="input w-full" id="phone" name="phone" type="text" placeholder="Phone" required value="{{ old('phone',$phone) }}">
</dd>
</div>
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Customer Type
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<div class="sm:grid-cols-2 sm:flex">
<div class="flex items-center px-2">
<input id="customer_type_personal" name="customer_type" value="Personal" required @checked(old('customer_type', $customer_type) == 'Personal') type="radio" class="focus:ring-gray-500 h-4 w-4 border-gray-300 disabled:opacity-75 disabled:cursor-not-allowed">
<label for="customer_type_personal" class="ml-3 block text-sm font-medium cursor-pointer">Personal</label>
</div>
<div class="flex items-center px-2">
<input id="customer_type_business" name="customer_type" value="Business" required @checked(old('customer_type', $customer_type) == 'Business') type="radio" class="focus:ring-gray-500 h-4 w-4 border-gray-300 disabled:opacity-75 disabled:cursor-not-allowed">
<label for="customer_type_business" class="ml-3 block text-sm font-medium cursor-pointer">Business</label>
</div>
</div>
</dd>
</div>
<input name="id" type="hidden" value="{{ old('id', $id ) }}">
<input name="custom_identifier" type="hidden" value="{{ old('custom_identifer', $contact['custom_identifier']) }}">

View File

@ -1,12 +0,0 @@
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
Province Code
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<select class="input w-full" id="province_code" name="province_code" required>
@foreach($provinces as $code => $province)
<option value="{{ $code }}" @selected(old('province_code', $province_code) == $code ) >{{ $province }}</option>
@endforeach
</select>
</dd>
</div>

View File

@ -1,12 +0,0 @@
<div class="px-4 py-2 sm:px-6 lg:grid lg:grid-cols-3 lg:gap-4 lg:flex lg:items-center">
<dt class="text-sm leading-5 font-medium text-gray-500 mr-4">
State
</dt>
<dd class="mt-1 text-sm leading-5 text-gray-900 sm:mt-0 sm:col-span-2">
<select class="input w-full" id="province_code" required name="province_code">
@foreach($states as $code => $state)
<option value="{{ $code }}" @selected(old('province_code', $province_code) == $code ) >{{ $state }}</option>
@endforeach
</select>
</dd>
</div>