From f4b590228a46990069566abd91aef682d9409cbf Mon Sep 17 00:00:00 2001 From: Kishan Patel Date: Mon, 18 Apr 2022 08:17:08 +0530 Subject: [PATCH] Forte gateway added. --- app/Models/Gateway.php | 8 + app/PaymentDrivers/Forte/ACH.php | 231 +++++++++++++++++ app/PaymentDrivers/Forte/CreditCard.php | 233 ++++++++++++++++++ app/PaymentDrivers/FortePaymentDriver.php | 90 +++++++ ...022_04_14_121548_forte_payment_gateway.php | 49 ++++ .../gateways/forte/ach/authorize.blade.php | 108 ++++++++ .../gateways/forte/ach/pay.blade.php | 80 ++++++ .../forte/credit_card/authorize.blade.php | 108 ++++++++ .../gateways/forte/credit_card/pay.blade.php | 80 ++++++ .../forte/includes/credit_card.blade.php | 12 + 10 files changed, 999 insertions(+) create mode 100644 app/PaymentDrivers/Forte/ACH.php create mode 100644 app/PaymentDrivers/Forte/CreditCard.php create mode 100644 app/PaymentDrivers/FortePaymentDriver.php create mode 100644 database/migrations/2022_04_14_121548_forte_payment_gateway.php create mode 100644 resources/views/portal/ninja2020/gateways/forte/ach/authorize.blade.php create mode 100644 resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php create mode 100644 resources/views/portal/ninja2020/gateways/forte/credit_card/authorize.blade.php create mode 100644 resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php create mode 100644 resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php diff --git a/app/Models/Gateway.php b/app/Models/Gateway.php index 5f214de0ce4b..0e61e28b3b7e 100644 --- a/app/Models/Gateway.php +++ b/app/Models/Gateway.php @@ -63,6 +63,8 @@ class Gateway extends StaticModel $link = 'https://applications.sagepay.com/apply/2C02C252-0F8A-1B84-E10D-CF933EFCAA99'; } elseif ($this->id == 20 || $this->id == 56) { $link = 'https://dashboard.stripe.com/account/apikeys'; + } elseif ($this->id == 59) { + $link = 'https://www.forte.net/'; } return $link; @@ -170,6 +172,12 @@ class Gateway extends StaticModel GatewayType::HOSTED_PAGE => ['refund' => false, 'token_billing' => false, 'webhooks' => [' ']] // Razorpay ]; break; + case 59: + return [ + GatewayType::CREDIT_CARD => ['refund' => true, 'token_billing' => true], // Forte + GatewayType::BANK_TRANSFER => ['refund' => true, 'token_billing' => true, 'webhooks' => [' ']], + ]; + break; default: return []; break; diff --git a/app/PaymentDrivers/Forte/ACH.php b/app/PaymentDrivers/Forte/ACH.php new file mode 100644 index 000000000000..96f20e54a859 --- /dev/null +++ b/app/PaymentDrivers/Forte/ACH.php @@ -0,0 +1,231 @@ +forte = $forte; + } + + public function authorizeView(array $data) + { + return render('gateways.forte.ach.authorize', $data); + } + + public function authorizeResponse(Request $request) + { + $customer_token = null; + $request->validate([ + 'account_number'=>'required|numeric', + 'account_holder_name'=>'required|string', + 'routing_number'=>'required|numeric', + ]); + if ($this->forte->client->gateway_tokens->count() == 0) { + try { + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $this->forte_base_uri.'organizations/'.$this->forte_organization_id.'/locations/'.$this->forte_location_id.'/customers/', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS =>'{ + "first_name": "'.$this->forte->client->name.'", + "last_name": "'.$this->forte->client->name.'", + "company_name": "'.$this->forte->client->name.'", + "customer_id": "'.$this->forte->client->number.'" + }', + CURLOPT_HTTPHEADER => array( + 'X-Forte-Auth-Organization-Id: '.$this->forte_organization_id, + 'Content-Type: application/json', + 'Authorization: Basic '.base64_encode($this->forte_api_access_id.':'.$this->forte_secure_key), + 'Cookie: visid_incap_621087=QJCccwHeTHinK5DnAeQIuXPk5mAAAAAAQUIPAAAAAAATABmm7IZkHhUi85sN+UaS; nlbi_621087=eeFJXPvhGXW3XVl0R1efXgAAAAC5hY2Arn4aSDDQA+R2vZZu; incap_ses_713_621087=IuVrdOb1HwK0pTS8ExblCT8B6GAAAAAAWyswWx7wzWve4j23+Nsp4w==' + ), + )); + + $response = curl_exec($curl); + $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + + curl_close($curl); + + $response=json_decode($response); + + if ($httpcode>299) { + $error = Validator::make([], []); + $error->getMessageBag()->add('gateway_error', $response->response->response_desc); + return redirect()->back()->withErrors($error); + } + + $customer_token=$response->customer_token; + } catch (\Throwable $th) { + throw $th; + } + }else{ + $customer_token = $this->forte->client->gateway_tokens[0]->gateway_customer_reference; + } + + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $this->forte_base_uri.'organizations/'.$this->forte_organization_id.'/locations/'.$this->forte_location_id.'/customers/'.$customer_token.'/paymethods', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS =>'{ + "notes":"'.$request->account_holder_name.' echeck", + "echeck": { + "account_holder": "'.$request->account_holder_name.'", + "account_number":"'.$request->account_number.'", + "routing_number":"'.$request->routing_number.'", + "account_type":"checking" + } + }', + CURLOPT_HTTPHEADER => array( + 'X-Forte-Auth-Organization-Id: '.$this->forte_organization_id, + 'Content-Type: application/json', + 'Authorization: Basic '.base64_encode($this->forte_api_access_id.':'.$this->forte_secure_key), + 'Cookie: visid_incap_621087=QJCccwHeTHinK5DnAeQIuXPk5mAAAAAAQUIPAAAAAAATABmm7IZkHhUi85sN+UaS; nlbi_621087=tVVcSY5O+xzIMhyvR1efXgAAAABn4GsrsejFXewG9LEvz7cm; incap_ses_9153_621087=wAileyRCBU3lBWqsNP0Ff80/6GAAAAAASCPsRmBm9ygyrCA0iBX3kg==; incap_ses_9210_621087=OHvJaqfG9Cc+r/0GZX7Qf10a6WAAAAAA1CWMfnTjC/4Y/4bz/HTgBg==; incap_ses_713_621087=Lu/yR4IM2iokOlO8ExblCSWB6WAAAAAANBLUy0jRk/4YatHkXIajvA==' + ), + )); + + $response = curl_exec($curl); + $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + curl_close($curl); + $response=json_decode($response); + + if ($httpcode>299) { + $error = Validator::make([], []); + $error->getMessageBag()->add('gateway_error', $response->response->response_desc); + return redirect()->back()->withErrors($error); + } + + $payment_meta = new \stdClass; + // $payment_meta->brand = (string)sprintf('%s (%s)', $request->bank_name, ctrans('texts.ach')); + $payment_meta->brand = (string)ctrans('texts.ach'); + $payment_meta->last4 = (string)$response->echeck->last_4_account_number; + $payment_meta->exp_year = '-'; + $payment_meta->type = GatewayType::BANK_TRANSFER; + + $data = [ + 'payment_meta' => $payment_meta, + 'token' => $response->paymethod_token, + 'payment_method_id' => $request->gateway_type_id, + ]; + + $this->forte->storeGatewayToken($data, ['gateway_customer_reference' => $customer_token]); + + return redirect()->route('client.payment_methods.index'); + } + + public function paymentView(array $data) + { + $this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data); + $this->forte->payment_hash->save(); + + $data['gateway'] = $this; + $data['system_amount_with_fee'] = $data['amount_with_fee']; + $data['fee_percent'] = $this->forte->company_gateway->fees_and_limits->{GatewayType::BANK_TRANSFER}->fee_percent; + $data['total']['fee_total'] = $data['total']['invoice_totals'] * $data['fee_percent'] / 100; + $data['total']['amount_with_fee'] = $data['total']['fee_total'] + $data['total']['invoice_totals']; + $data['amount_with_fee'] = $data['total']['amount_with_fee']; + return render('gateways.forte.ach.pay', $data); + } + + public function paymentResponse($request) + { + $data=$request; + + try { + $curl = curl_init(); + curl_setopt_array($curl, array( + CURLOPT_URL => $this->forte_base_uri.'organizations/'.$this->forte_organization_id.'/locations/'.$this->forte_location_id.'/transactions', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS =>'{ + "action":"sale", + "authorization_amount": '.$data->amount_with_fee.', + "paymethod_token": "'.$data->payment_token.'", + "echeck":{ + "sec_code":"PPD", + }, + "billing_address":{ + "first_name": "'.auth()->user()->client->name.'", + "last_name": "'.auth()->user()->client->name.'" + } + }', + CURLOPT_HTTPHEADER => array( + 'X-Forte-Auth-Organization-Id: '.$this->forte_organization_id, + 'Content-Type: application/json', + 'Authorization: Basic '.base64_encode($this->forte_api_access_id.':'.$this->forte_secure_key), + 'Cookie: visid_incap_621087=u18+3REYR/iISgzZxOF5s2ODW2IAAAAAQUIPAAAAAADuGqKgECQLS81FcSDrmhGe; nlbi_621087=YHngadhJ2VU+yr7/R1efXgAAAAD3mQyhqmnLls8PRu4iN58G; incap_ses_1136_621087=CVdrXUdhIlm9WJNDieLDD4QVXGIAAAAAvBwvkUcwhM0+OwvdPm2stg==' + ), + )); + + $response = curl_exec($curl); + $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + + curl_close($curl); + + $response=json_decode($response); + } catch (\Throwable $th) { + throw $th; + } + + if ($httpcode>299) { + $error = Validator::make([], []); + $error->getMessageBag()->add('gateway_error', $response->response->response_desc); + return redirect('client/invoices')->withErrors($error); + } + + $data['gateway_type_id']=GatewayType::CREDIT_CARD; + $data['amount']=$request->system_amount_with_fee; + $data['payment_type']=GatewayType::CREDIT_CARD; + $data['transaction_reference']=$response->transaction_id; + + $payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED); + return redirect('client/invoices')->withSuccess('Invoice paid.'); + } +} diff --git a/app/PaymentDrivers/Forte/CreditCard.php b/app/PaymentDrivers/Forte/CreditCard.php new file mode 100644 index 000000000000..aeb68ef7625e --- /dev/null +++ b/app/PaymentDrivers/Forte/CreditCard.php @@ -0,0 +1,233 @@ +forte = $forte; + } + + public function authorizeView(array $data) + { + return render('gateways.forte.credit_card.authorize', $data); + } + + public function authorizeResponse($request) + { + $customer_token = null; + $request->validate([ + 'card_number'=>'required', + 'card_holders_name'=>'required|string', + 'expiry_month'=>'required', + 'expiry_year'=>'required', + 'cvc'=>'required', + ]); + if ($this->forte->client->gateway_tokens->count() == 0) { + try { + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $this->forte_base_uri.'organizations/'.$this->forte_organization_id.'/locations/'.$this->forte_location_id.'/customers/', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS =>'{ + "first_name": "'.$this->forte->client->name.'", + "last_name": "'.$this->forte->client->name.'", + "company_name": "'.$this->forte->client->name.'", + "customer_id": "'.$this->forte->client->number.'" + }', + CURLOPT_HTTPHEADER => array( + 'X-Forte-Auth-Organization-Id: '.$this->forte_organization_id, + 'Content-Type: application/json', + 'Authorization: Basic '.base64_encode($this->forte_api_access_id.':'.$this->forte_secure_key), + 'Cookie: visid_incap_621087=QJCccwHeTHinK5DnAeQIuXPk5mAAAAAAQUIPAAAAAAATABmm7IZkHhUi85sN+UaS; nlbi_621087=eeFJXPvhGXW3XVl0R1efXgAAAAC5hY2Arn4aSDDQA+R2vZZu; incap_ses_713_621087=IuVrdOb1HwK0pTS8ExblCT8B6GAAAAAAWyswWx7wzWve4j23+Nsp4w==' + ), + )); + + $response = curl_exec($curl); + $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + + curl_close($curl); + + $response=json_decode($response); + + if ($httpcode>299) { + $error = Validator::make([], []); + $error->getMessageBag()->add('gateway_error', $response->response->response_desc); + return redirect()->back()->withErrors($error); + } + + $customer_token=$response->customer_token; + } catch (\Throwable $th) { + throw $th; + } + }else{ + $customer_token = $this->forte->client->gateway_tokens[0]->gateway_customer_reference; + } + + $curl = curl_init(); + + curl_setopt_array($curl, array( + CURLOPT_URL => $this->forte_base_uri.'organizations/'.$this->forte_organization_id.'/locations/'.$this->forte_location_id.'/customers/'.$customer_token.'/paymethods', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS =>'{ + "notes":"'.$request->card_holders_name.' Card", + "card": { + "name_on_card":"'.$request->card_holders_name.'", + "card_type":"'.$request->card_type.'", + "account_number":"'.str_replace(' ', '', $request->card_number).'", + "expire_month":'.$request->expiry_month.', + "expire_year":20'.$request->expiry_year.', + "card_verification_value": "'.$request->cvc.'" + } + }', + CURLOPT_HTTPHEADER => array( + 'X-Forte-Auth-Organization-Id: '.$this->forte_organization_id, + 'Content-Type: application/json', + 'Authorization: Basic '.base64_encode($this->forte_api_access_id.':'.$this->forte_secure_key), + 'Cookie: visid_incap_621087=QJCccwHeTHinK5DnAeQIuXPk5mAAAAAAQUIPAAAAAAATABmm7IZkHhUi85sN+UaS' + ), + )); + + $response = curl_exec($curl); + $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + curl_close($curl); + $response=json_decode($response); + + if ($httpcode>299) { + $error = Validator::make([], []); + $error->getMessageBag()->add('gateway_error', $response->response->response_desc); + return redirect()->back()->withErrors($error); + } + + $payment_meta = new \stdClass; + $payment_meta->exp_month = (string) $response->card->expire_month; + $payment_meta->exp_year = (string) $response->card->expire_year; + $payment_meta->brand = (string) $response->card->card_type; + $payment_meta->last4 = (string) $response->card->last_4_account_number; + $payment_meta->type = GatewayType::CREDIT_CARD; + + $data = [ + 'payment_meta' => $payment_meta, + 'token' => $response->paymethod_token, + 'payment_method_id' => $request->payment_method_id, + ]; + + $this->forte->storeGatewayToken($data, ['gateway_customer_reference' => $customer_token]); + + return redirect()->route('client.payment_methods.index'); + } + + public function paymentView(array $data) + { + $this->forte->payment_hash->data = array_merge((array) $this->forte->payment_hash->data, $data); + $this->forte->payment_hash->save(); + + $data['gateway'] = $this; + $data['system_amount_with_fee'] = $data['amount_with_fee']; + $data['fee_percent'] = $this->forte->company_gateway->fees_and_limits->{GatewayType::CREDIT_CARD}->fee_percent; + $data['total']['fee_total'] = $data['total']['invoice_totals'] * $data['fee_percent'] / 100; + $data['total']['amount_with_fee'] = $data['total']['fee_total'] + $data['total']['invoice_totals']; + $data['amount_with_fee'] = $data['total']['amount_with_fee']; + return render('gateways.forte.credit_card.pay', $data); + } + + public function paymentResponse(PaymentResponseRequest $request) + { + $data=$request; + + try { + $curl = curl_init(); + curl_setopt_array($curl, array( + CURLOPT_URL => $this->forte_base_uri.'organizations/'.$this->forte_organization_id.'/locations/'.$this->forte_location_id.'/transactions', + CURLOPT_RETURNTRANSFER => true, + CURLOPT_ENCODING => '', + CURLOPT_MAXREDIRS => 10, + CURLOPT_TIMEOUT => 0, + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, + CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_POSTFIELDS =>'{ + "action":"sale", + "authorization_amount": '.$data->amount_with_fee.', + "service_fee_amount": '.$data->fee_total.', + "paymethod_token": "'.$data->payment_token.'", + "billing_address":{ + "first_name": "'.auth()->user()->client->name.'", + "last_name": "'.auth()->user()->client->name.'" + } + }', + CURLOPT_HTTPHEADER => array( + 'X-Forte-Auth-Organization-Id: '.$this->forte_organization_id, + 'Content-Type: application/json', + 'Authorization: Basic '.base64_encode($this->forte_api_access_id.':'.$this->forte_secure_key), + 'Cookie: visid_incap_621087=u18+3REYR/iISgzZxOF5s2ODW2IAAAAAQUIPAAAAAADuGqKgECQLS81FcSDrmhGe; nlbi_621087=YHngadhJ2VU+yr7/R1efXgAAAAD3mQyhqmnLls8PRu4iN58G; incap_ses_1136_621087=CVdrXUdhIlm9WJNDieLDD4QVXGIAAAAAvBwvkUcwhM0+OwvdPm2stg==' + ), + )); + + $response = curl_exec($curl); + $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE); + + curl_close($curl); + + $response=json_decode($response); + } catch (\Throwable $th) { + throw $th; + } + if ($httpcode>299) { + $error = Validator::make([], []); + $error->getMessageBag()->add('gateway_error', $response->response->response_desc); + return redirect('client/invoices')->withErrors($error); + } + + $data['gateway_type_id']=GatewayType::CREDIT_CARD; + $data['amount']=$request->system_amount_with_fee; + $data['payment_type']=GatewayType::CREDIT_CARD; + $data['transaction_reference']=$response->transaction_id; + + $payment=$this->forte->createPayment($data, Payment::STATUS_COMPLETED); + return redirect('client/invoices')->withSuccess('Invoice paid.'); + } +} diff --git a/app/PaymentDrivers/FortePaymentDriver.php b/app/PaymentDrivers/FortePaymentDriver.php new file mode 100644 index 000000000000..e79df1dd96dd --- /dev/null +++ b/app/PaymentDrivers/FortePaymentDriver.php @@ -0,0 +1,90 @@ + CreditCard::class, + GatewayType::BANK_TRANSFER => ACH::class, + ]; + + /** + * Returns the gateway types. + */ + public function gatewayTypes(): array + { + $types = []; + + $types[] = GatewayType::CREDIT_CARD; + $types[] = GatewayType::BANK_TRANSFER; + + return $types; + } + + const SYSTEM_LOG_TYPE = SystemLog::TYPE_STRIPE; //define a constant for your gateway ie TYPE_YOUR_CUSTOM_GATEWAY - set the const in the SystemLog model + + public function setPaymentMethod($payment_method_id) + { + $class = self::$methods[$payment_method_id]; + $this->payment_method = new $class($this); + return $this; + } + + public function authorizeView(array $data) + { + return $this->payment_method->authorizeView($data); //this is your custom implementation from here + } + + public function authorizeResponse($request) + { + return $this->payment_method->authorizeResponse($request); //this is your custom implementation from here + } + + public function processPaymentView(array $data) + { + return $this->payment_method->paymentView($data); //this is your custom implementation from here + } + + public function processPaymentResponse($request) + { + return $this->payment_method->paymentResponse($request); //this is your custom implementation from here + } + + // public function refund(Payment $payment, $amount, $return_client_response = false) + // { + // return $this->payment_method->yourRefundImplementationHere(); //this is your custom implementation from here + // } + + // public function tokenBilling(ClientGatewayToken $cgt, PaymentHash $payment_hash) + // { + // return $this->payment_method->yourTokenBillingImplmentation(); //this is your custom implementation from here + // } +} diff --git a/database/migrations/2022_04_14_121548_forte_payment_gateway.php b/database/migrations/2022_04_14_121548_forte_payment_gateway.php new file mode 100644 index 000000000000..c603180b14b9 --- /dev/null +++ b/database/migrations/2022_04_14_121548_forte_payment_gateway.php @@ -0,0 +1,49 @@ +baseUri = ""; + $fields->apiAccessId = ""; + $fields->secureKey = ""; + $fields->authOrganizationId = ""; + $fields->organizationId = ""; + $fields->locationId = ""; + + $forte = new Gateway; + $forte->id = 59; + $forte->name = 'Forte'; + $forte->key = 'kivcvjexxvdiyqtj3mju5d6yhpeht2xs'; + $forte->provider = 'Forte'; + $forte->is_offsite = true; + $forte->fields = \json_encode($fields); + $forte->visible = 1; + $forte->site_url = 'https://www.forte.net/'; + $forte->default_gateway_type_id = GatewayType::CREDIT_CARD; + $forte->save(); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/resources/views/portal/ninja2020/gateways/forte/ach/authorize.blade.php b/resources/views/portal/ninja2020/gateways/forte/ach/authorize.blade.php new file mode 100644 index 000000000000..950102bdb6f4 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/ach/authorize.blade.php @@ -0,0 +1,108 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Bank Details', 'card_title' => 'Bank Details']) + +@section('gateway_head') + {{-- @if($gateway->company_gateway->getConfigField('account_id')) + + + @else --}} + {{-- --}} + {{-- @endif --}} +@endsection + +@section('gateway_content') + @if(session()->has('ach_error')) +
+

{{ session('ach_error') }}

+
+ @endif + @if(Session::has('error')) +
{{ Session::get('error') }}
+ @endif + @if ($errors->any()) +
+ +
+ @endif + +
+ @csrf + + {{-- --}} + + + + + + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_type')]) + + + {{ __('texts.individual_account') }} + + + + {{ __('texts.company_account') }} + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_holder_name')]) + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.country')]) + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.currency')]) + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.routing_number')]) + + @endcomponent + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.account_number')]) + + @endcomponent + + @component('portal.ninja2020.components.general.card-element-single') + + + @endcomponent + +
+ + +
+
+ +@endsection + +@section('gateway_footer') + +@endsection diff --git a/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php b/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php new file mode 100644 index 000000000000..783c7ab468b6 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/ach/pay.blade.php @@ -0,0 +1,80 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => 'Bank Transfer', 'card_title' => 'Bank Transfer']) + +@section('gateway_head') + {{-- + --}} + + + + + +@endsection + +@section('gateway_content') +
+ @csrf + + + + + + + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + Bank Transfer + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + @endcomponent +
+ +
+
+ +@endsection + +@section('gateway_footer') + +@endsection diff --git a/resources/views/portal/ninja2020/gateways/forte/credit_card/authorize.blade.php b/resources/views/portal/ninja2020/gateways/forte/credit_card/authorize.blade.php new file mode 100644 index 000000000000..8cd7e92ba659 --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/credit_card/authorize.blade.php @@ -0,0 +1,108 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => ctrans('texts.credit_card'), 'card_title' => ctrans('texts.credit_card')]) + +@section('gateway_head') + {{-- + --}} + + + + + + + + +@endsection + +@section('gateway_content') +
+ @csrf + + {{-- --}} + + + + + + + + + + @if(!Request::isSecure()) +

{{ ctrans('texts.https_required') }}

+ @endif + + + @if(Session::has('error')) +
{{ Session::get('error') }}
+ @endif + @if ($errors->any()) +
+
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+ @endif + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.method')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.forte.includes.credit_card') + +
+ + +
+ +
+ + {{-- @component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'card_button']) + {{ ctrans('texts.add_payment_method') }} + @endcomponent --}} +@endsection + +@section('gateway_footer') + {{-- @if($gateway->company_gateway->getConfigField('testMode')) + + @else + + @endif + + --}} + +@endsection \ No newline at end of file diff --git a/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php new file mode 100644 index 000000000000..4c39a1eacd9f --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/credit_card/pay.blade.php @@ -0,0 +1,80 @@ +@extends('portal.ninja2020.layout.payments', ['gateway_title' => ctrans('texts.payment_type_credit_card'), 'card_title' => ctrans('texts.payment_type_credit_card')]) + +@section('gateway_head') + {{-- + --}} + + + + + +@endsection + +@section('gateway_content') +
+ @csrf + + + + + + + + + + + + +
+ + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.payment_type')]) + {{ ctrans('texts.credit_card') }} + @endcomponent + + @include('portal.ninja2020.gateways.includes.payment_details') + + @component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.pay_with')]) + @if(count($tokens) > 0) + @foreach($tokens as $token) + + @endforeach + @endisset + + @endcomponent +
+ +
+
+ +@endsection + +@section('gateway_footer') + +@endsection diff --git a/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php b/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php new file mode 100644 index 000000000000..98ba257752bc --- /dev/null +++ b/resources/views/portal/ninja2020/gateways/forte/includes/credit_card.blade.php @@ -0,0 +1,12 @@ +
+
+ + + + + +
+ +
+