From efaf77ab4ceb8bb07bdb35ec5fb560dd9621929c Mon Sep 17 00:00:00 2001 From: marcelo-machado-gn <106699763+marcelo-machado-gn@users.noreply.github.com> Date: Thu, 27 Apr 2023 16:30:56 -0300 Subject: [PATCH] Update efi.php --- efi.php | 72 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 16 deletions(-) diff --git a/efi.php b/efi.php index 2b43f31..cece192 100644 --- a/efi.php +++ b/efi.php @@ -108,11 +108,6 @@ function efi_config() 'Type' => 'yesno', 'Description' => 'Ativar boleto como forma de pagamento', ), - 'descontoBoleto' => array( - 'FriendlyName' => 'Desconto do Boleto ', - 'Type' => 'text', - 'Description' => '', - ), 'tipoDesconto' => array( 'FriendlyName' => 'Tipo de desconto ', 'Type' => 'dropdown', @@ -122,6 +117,11 @@ function efi_config() ), 'Description' => '', ), + 'descontoBoleto' => array( + 'FriendlyName' => 'Desconto do Boleto ', + 'Type' => 'text', + 'Description' => '', + ), 'numDiasParaVencimento' => array( 'FriendlyName' => 'Número de dias para o vencimento do boleto ', 'Type' => 'text', @@ -161,7 +161,7 @@ function efi_config() 'Description' => '', ), 'pixDiscount' => array( - 'FriendlyName' => 'Desconto do Pix (%) ', + 'FriendlyName' => 'Desconto do Pix (%) ', 'Type' => 'text', 'Size' => '3', 'Default' => '0%', @@ -174,6 +174,13 @@ function efi_config() 'Default' => '1', 'Description' => '', ), + 'pixCert' => array( + 'FriendlyName' => 'Certificado de Autenticação ', + 'Type' => 'text', + 'Size' => '350', + 'Default' => '/var/certs/cert.pem', + 'Description' => '', + ), 'activeCredit' => array( 'FriendlyName' => 'Cartão de Credito', 'Type' => 'yesno', @@ -195,16 +202,34 @@ function efi_config() 'Default' => false, 'Description' => 'Entenda os riscos de não configurar o mTLS acessando o link https://gnetbr.com/rke4baDVyd', ), - 'pixCert' => array( - 'FriendlyName' => 'Certificado de Autenticação ', - 'Type' => 'text', - 'Size' => '350', - 'Default' => '/var/certs/cert.pem', - 'Description' => '', - ), + 'gn_script' => array( 'Description' => ' @@ -280,11 +309,18 @@ function efi_link($gatewayParams) $identificadorDaConta = $gatewayParams['idConta']; $autoCompleteFields = generateAutoCompleteFields($gatewayParams); $autoCompletetotal = generateAutoCompleteTotal($gatewayParams); + $viewInvoiceModal = file_get_contents("$baseUrl/modules/gateways/efi/gerencianet_lib/scripts/js/viewInvoiceModal.js"); $apiEnvironment = ($gatewayParams['sandbox'] == 'on') ? "sandbox" : "api"; - $scriptGetPaymentToken = ""; + $scriptGetPaymentToken = ""; $paymentOptionsScript = " @@ -339,6 +375,9 @@ function efi_link($gatewayParams) case 'credit': return definedCreditCardPayment($gatewayParams); break; + case 'openFinance': + return definedOpenFinancePayment($gatewayParams); + break; default: break; } @@ -472,3 +511,4 @@ function definedCreditCardPayment($gatewayParams) } return createCard($gatewayParams, $gnIntegration, $errorMessages, $existingCharge); } +