<?php




if ($_settings->userdata('type') != '1') {
	echo 'Você não tem permissão para acessar essa página.';
	exit();
}

$mercadopago = $_settings->info('mercadopago');
$mercadopago_access_token = $_settings->info('mercadopago_access_token');
$mercadopago_tax = $_settings->info('mercadopago_tax');
$gerencianet = $_settings->info('gerencianet');
$gerencianet_client_id = $_settings->info('gerencianet_client_id');
$gerencianet_client_secret = $_settings->info('gerencianet_client_secret');
$gerencianet_pix_key = $_settings->info('gerencianet_pix_key');
$gerencianet_tax = $_settings->info('gerencianet_tax');
$paggue = $_settings->info('paggue');
$paggue_client_key = $_settings->info('paggue_client_key');
$paggue_client_secret = $_settings->info('paggue_client_secret');
$paggue_tax = $_settings->info('paggue_tax');
$openpix = $_settings->info('openpix');
$openpix_app_id = $_settings->info('openpix_app_id');
$openpix_tax = $_settings->info('openpix_tax');
$pay2m = $_settings->info('pay2m');
$pay2m_client_id = $_settings->info('pay2m_client_id');
$pay2m_client_secret = $_settings->info('pay2m_client_secret');
echo "\r\n" . '<style>' . "\r\n" . ' .active-tab{border-bottom:none!important;}.can-toggle {position: relative;margin-bottom:20px;}.can-toggle *, .can-toggle *:before, .can-toggle *:after {box-sizing: border-box;}.can-toggle input[type=checkbox] {opacity: 0;position: absolute;top: 0;left: 0;}.can-toggle input[type=checkbox]:checked ~ label .can-toggle__switch:before {content: attr(data-unchecked);left: 0;}.can-toggle input[type=checkbox]:checked ~ label .can-toggle__switch:after {content: attr(data-checked);}.can-toggle label {cursor:pointer;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;position: relative;display: flex;align-items: center;}.can-toggle label .can-toggle__switch {position: relative;}.can-toggle label .can-toggle__switch:before {content: attr(data-checked);position: absolute;top: 0;text-transform: uppercase;text-align: center;}.can-toggle label .can-toggle__switch:after {content: attr(data-unchecked);position: absolute;z-index: 5;text-transform: uppercase;text-align: center;background: white;transform: translate3d(0, 0, 0);}.can-toggle input[type=checkbox]:focus ~ label .can-toggle__switch, .can-toggle input[type=checkbox]:hover ~ label .can-toggle__switch {background-color: #777;}.can-toggle input[type=checkbox]:focus ~ label .can-toggle__switch:after, .can-toggle input[type=checkbox]:hover ~ label .can-toggle__switch:after {color: #5e5e5e;}.can-toggle input[type=checkbox]:hover ~ label {color: #6a6a6a;}.can-toggle input[type=checkbox]:checked ~ label:hover {color: #55bc49;}.can-toggle input[type=checkbox]:checked ~ label .can-toggle__switch {background-color: #70c767;}.can-toggle input[type=checkbox]:checked ~ label .can-toggle__switch:after {color: #4fb743;}.can-toggle input[type=checkbox]:checked:focus ~ label .can-toggle__switch, .can-toggle input[type=checkbox]:checked:hover ~ label .can-toggle__switch {background-color: #5fc054;}.can-toggle input[type=checkbox]:checked:focus ~ label .can-toggle__switch:after, .can-toggle input[type=checkbox]:checked:hover ~ label .can-toggle__switch:after {color: #47a43d;}.can-toggle label .can-toggle__switch {transition: background-color 0.3s cubic-bezier(0, 1, 0.5, 1);background: #848484;}.can-toggle label .can-toggle__switch:before {color: rgba(255, 255, 255, 0.5);}.can-toggle label .can-toggle__switch:after {transition: transform 0.3s cubic-bezier(0, 1, 0.5, 1);color: #777;}.can-toggle input[type=checkbox]:focus ~ label .can-toggle__switch:after, .can-toggle input[type=checkbox]:hover ~ label .can-toggle__switch:after {box-shadow: 0 3px 3px rgba(0, 0, 0, 0.4);}.can-toggle input[type=checkbox]:checked ~ label .can-toggle__switch:after {transform: translate3d(65px, 0, 0);}.can-toggle input[type=checkbox]:checked:focus ~ label .can-toggle__switch:after, .can-toggle input[type=checkbox]:checked:hover ~ label .can-toggle__switch:after {box-shadow: 0 3px 3px rgba(0, 0, 0, 0.4);}.can-toggle label {font-size: 14px;}.can-toggle label .can-toggle__switch {height: 36px;flex: 0 0 134px;border-radius: 4px;}.can-toggle label .can-toggle__switch:before {left: 67px;font-size: 12px;line-height: 36px;width: 67px;padding: 0 12px;}.can-toggle label .can-toggle__switch:after {top: 2px;left: 2px;border-radius: 2px;width: 65px;line-height: 32px;font-size: 12px;}.can-toggle label .can-toggle__switch:hover:after {box-shadow: 0 3px 3px rgba(0, 0, 0, 0.4);}@media all and (max-width:40em){#tabs{flex-wrap:wrap;}#tabs .mr-1{margin-bottom:15px;}}' . "\r\n" . '</style>' . "\r\n" . '<main class="h-full pb-16 overflow-y-auto">' . "\r\n\t" . '<div class="container px-6 mx-auto grid">' . "\r\n\t\t" . '<h2' . "\r\n\t\t" . 'class="my-6 text-2xl font-semibold text-gray-700 dark:text-gray-200"' . "\r\n\t\t" . '>' . "\r\n\t\t" . 'Gateway de pagamento' . "\r\n\t" . '</h2>' . "\r\n\r\n\r\n\t" . '<div class="px-4 py-3 mb-8 bg-white rounded-lg shadow-md dark:bg-gray-800">' . "\r\n\r\n\t\t" . '<div class="flex">' . "\r\n\t\t\t" . '<ul class="flex" id="tabs">' . "\r\n\t\t\t\t" . '<li class="mr-1">' . "\r\n\t\t\t\t\t" . '<a href="#tab1" class="dark:text-gray-300 dark:border-gray-600 dark:bg-gray-800 inline-block py-2 px-4 font-semibold border rounded-t text-gray-700 active-tab">MercadoPago</a>' . "\r\n\t\t\t\t" . '</li>' . "\r\n\t\t\t\t" . '<li class="mr-1">' . "\r\n\t\t\t\t\t" . '<a href="#tab2" class="dark:text-gray-300 dark:border-gray-600 dark:bg-gray-800 inline-block py-2 px-4 font-semibold border rounded-t text-gray-700">Gerencianet (Efí)</a>' . "\r\n\t\t\t\t" . '</li>' . "\r\n\t\t\t\t" . '<li class="mr-1">' . "\r\n\t\t\t\t\t" . '<a href="#tab3" class="dark:text-gray-300 dark:border-gray-600 dark:bg-gray-800 inline-block py-2 px-4 font-semibold border rounded-t text-gray-700">Paggue</a>' . "\r\n\t\t\t\t" . '</li>' . "\r\n\t\t\t\t" . '<li class="mr-1">' . "\r\n\t\t\t\t\t" . '<a href="#tab4" class="dark:text-gray-300 dark:border-gray-600 dark:bg-gray-800 inline-block py-2 px-4 font-semibold border rounded-t text-gray-700">OpenPix</a>' . "\r\n\t\t\t\t" . '</li>' . "\r\n\t\t\t\t" . '<li class="mr-1">' . "\r\n\t\t\t\t\t" . '<a href="#tab5" class="dark:text-gray-300 dark:border-gray-600 dark:bg-gray-800 inline-block py-2 px-4 font-semibold border rounded-t text-gray-700">Pay2m</a>' . "\r\n\t\t\t\t" . '</li>' . "\r\n\t\t\t" . '</ul>' . "\r\n\t\t" . '</div>' . "\r\n\r\n\r\n\r\n\t\t" . '<form action="" id="gateway-form">' . "\r\n\r\n\t\t\t" . '<div class="mt-4">' . "\t\r\n\r\n\r\n\t\t\t\t" . '<div id="tab1" class="tabcontent text-gray-700 dark:text-gray-400">' . "\r\n\r\n\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400">Habilitar Mercado Pago?</span>' . "\t\r\n\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '<div class="can-toggle">' . "\r\n\t\t\t\t\t\t" . '<input type="checkbox" name="mercadopago" id="mercadopago" ';
echo (isset($mercadopago) && $mercadopago == 1 ? 'checked' : '');
echo '>' . "\r\n\t\t\t\t\t\t" . '<label for="mercadopago">' . "\r\n\t\t\t\t\t\t\t" . '<div class="can-toggle__switch" data-checked="Sim" data-unchecked="Não"></div>' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t" . '<div class="mercadopago">' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Access Token:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="mercadopago_access_token" id="mercadopago_access_token"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="ex: APP_USR-3168251416537780-022013-002dd7b5414e26092866660fb80a874a-190911003" value="';
echo (isset($mercadopago_access_token) ? $mercadopago_access_token : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Taxa (%):</strong>' . "\r\n\t\t\t\t\t\t\t" . '<p>Taxa adicional que será cobrada para o cliente no ato do pagamento.</p>' . "\r\n\t\t\t\t\t\t\t" . '</span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="mercadopago_tax" id="mercadopago_tax"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="0" type="number" value="';
echo (isset($mercadopago_tax) ? $mercadopago_tax : 0);
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '<div id="tab2" class="tabcontent text-gray-700 dark:text-gray-400 hidden">' . "\r\n\r\n\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400">Habilitar Gerencianet (Efí)?</span>' . "\t\r\n\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '<div class="can-toggle">' . "\r\n\t\t\t\t\t\t" . '<input type="checkbox" name="gerencianet" id="gerencianet" ';
echo (isset($gerencianet) && $gerencianet == 1 ? 'checked' : '');
echo '>' . "\r\n\t\t\t\t\t\t" . '<label for="gerencianet">' . "\r\n\t\t\t\t\t\t\t" . '<div class="can-toggle__switch" data-checked="Sim" data-unchecked="Não"></div>' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t" . '<div class="gerencianet">' . "\r\n\t\t\t\t\t\t" . '<p>Preencha os dados abaixo e faça upload do certificado com o nome <strong>pagamentos.pem</strong> no diretório principal do site.</p>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Client ID:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="gerencianet_client_id" id="gerencianet_client_id"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="ex: Client_Id_2456913797e93b8933243e1d4ef36e52c9c6" value="';
echo (isset($gerencianet_client_id) ? $gerencianet_client_id : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Client Secret:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="gerencianet_client_secret" id="gerencianet_client_secret"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="ex: Client_Secret_afc18534a5534ab49b36f370871d088a1cce3cc" value="';
echo (isset($gerencianet_client_secret) ? $gerencianet_client_secret : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Chave Aleatória:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="gerencianet_pix_key" id="gerencianet_pix_key"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="ex: b3b6d68a-50db-3d88-b7ee-g215b41d0ec2" value="';
echo (isset($gerencianet_pix_key) ? $gerencianet_pix_key : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Taxa (%):</strong>' . "\r\n\t\t\t\t\t\t\t" . '<p>Taxa adicional que será cobrada para o cliente no ato do pagamento.</p>' . "\r\n\t\t\t\t\t\t\t" . '</span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="gerencianet_tax" id="gerencianet_tax"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="0" type="number" value="';
echo (isset($gerencianet_tax) ? $gerencianet_tax : 0);
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '<div id="tab3" class="tabcontent text-gray-700 dark:text-gray-400 hidden">' . "\r\n\r\n\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400">Habilitar Paggue?</span>' . "\t\r\n\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '<div class="can-toggle">' . "\r\n\t\t\t\t\t\t" . '<input type="checkbox" name="paggue" id="paggue" ';
echo (isset($paggue) && $paggue == 1 ? 'checked' : '');
echo '>' . "\r\n\t\t\t\t\t\t" . '<label for="paggue">' . "\r\n\t\t\t\t\t\t\t" . '<div class="can-toggle__switch" data-checked="Sim" data-unchecked="Não"></div>' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t" . '<div class="paggue">' . "\r\n\t\t\t\t\t\t" . '<p>Clique no link para obter as chaves de integração com o <a style="color:blue;text-decoration:underline;" href="https://portal.paggue.io/integrations" target="_blank">Paggue</a></p>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Client KEY:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="paggue_client_key" id="paggue_client_key"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="Informe a chave Client Key do Paggue" value="';
echo (isset($paggue_client_key) ? $paggue_client_key : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Client Secret:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="paggue_client_secret" id="paggue_client_secret"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="Informe a chave Client Secret do Paggue" value="';
echo (isset($paggue_client_secret) ? $paggue_client_secret : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Taxa (%):</strong>' . "\r\n\t\t\t\t\t\t\t" . '<p>Taxa adicional que será cobrada para o cliente no ato do pagamento.</p>' . "\r\n\t\t\t\t\t\t\t" . '</span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="paggue_tax" id="paggue_tax"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="0" type="number" value="';
echo (isset($paggue_tax) ? $paggue_tax : 0);
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Webhook URL:</strong><p>Adicone a url abaixo na área "Webhook URL" no Paggue!</p></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="" id=""' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . ' value="';
echo '' . BASE_URL . 'webhook.php?notify=paggue';
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '<div id="tab4" class="tabcontent text-gray-700 dark:text-gray-400 hidden">' . "\r\n\r\n\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400">Habilitar OpenPix?</span>' . "\t\r\n\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '<div class="can-toggle">' . "\r\n\t\t\t\t\t\t" . '<input type="checkbox" name="openpix" id="openpix" ';
echo (isset($openpix) && $openpix == 1 ? 'checked' : '');
echo '>' . "\r\n\t\t\t\t\t\t" . '<label for="openpix">' . "\r\n\t\t\t\t\t\t\t" . '<div class="can-toggle__switch" data-checked="Sim" data-unchecked="Não"></div>' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t" . '<div class="openpix">' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>App ID:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="openpix_app_id" id="openpix_app_id"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="Informe o App ID do OpenPix" value="';
echo (isset($openpix_app_id) ? $openpix_app_id : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Taxa (%):</strong>' . "\r\n\t\t\t\t\t\t\t" . '<p>Taxa adicional que será cobrada para o cliente no ato do pagamento.</p>' . "\r\n\t\t\t\t\t\t\t" . '</span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="openpix_tax" id="openpix_tax"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="0" type="number" value="';
echo (isset($openpix_tax) ? $openpix_tax : 0);
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Webhook URL:</strong><p>Adicone a url abaixo na área "Webhook" no OpenPix!</p></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="" id=""' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . ' value="';
echo '' . BASE_URL . 'webhook.php?notify=openpix';
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t\t" . '<div id="tab5" class="tabcontent text-gray-700 dark:text-gray-400">' . "\r\n\r\n\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400">Habilitar Pay2m?</span>' . "\t\r\n\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '<div class="can-toggle">' . "\r\n\t\t\t\t\t\t" . '<input type="checkbox" name="pay2m" id="pay2m" ';
echo (isset($pay2m) && $pay2m == 1 ? 'checked' : '');
echo '>' . "\r\n\t\t\t\t\t\t" . '<label for="pay2m">' . "\r\n\t\t\t\t\t\t\t" . '<div class="can-toggle__switch" data-checked="Sim" data-unchecked="Não"></div>' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t\t" . '<div class="pay2m">' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Client ID:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="pay2m_client_id" id="pay2m_client_id"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="ex: APP_USR-3168251416537780-022013-002dd7b5414e26092866660fb80a874a-190911003" value="';
echo (isset($pay2m_client_id) ? $pay2m_client_id : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Client Secret:</strong></span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="pay2m_client_secret" id="pay2m_client_secret"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="ex: APP_USR-3168251416537780-022013-002dd7b5414e26092866660fb80a874a-190911003" value="';
echo (isset($pay2m_client_secret) ? $pay2m_client_secret : '');
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t\t" . '<label class="block mt-4 text-sm">' . "\r\n\t\t\t\t\t\t\t" . '<span class="text-gray-700 dark:text-gray-400"><strong>Taxa (%):</strong>' . "\r\n\t\t\t\t\t\t\t" . '<p>Taxa adicional que será cobrada para o cliente no ato do pagamento.</p>' . "\r\n\t\t\t\t\t\t\t" . '</span>' . "\r\n\t\t\t\t\t\t\t" . '<input name="pay2m_tax" id="pay2m_tax"' . "\r\n\t\t\t\t\t\t\t" . 'class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input"' . "\r\n\t\t\t\t\t\t\t" . 'placeholder="0" type="number" value="';
echo (isset($pay2m_tax) ? $pay2m_tax : 0);
echo '" />' . "\r\n\t\t\t\t\t\t" . '</label>' . "\r\n\t\t\t\t\t" . '</div>' . "\r\n\t\t\t\t" . '</div>' . "\r\n\r\n\t\t\t" . '</div>' . "\r\n\r\n\r\n\r\n\r\n\t\t\t" . '<div style="margin-top:20px;"> ' . "\r\n\t\t\t\t" . '<input type="hidden" name="gateway" value=\'1\'>' . "\r\n\t\t\t\t" . '<button form="gateway-form" class="px-5 py-3 font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-lg active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple">' . "\r\n\t\t\t\t\t" . 'Salvar' . "\r\n\t\t\t\t" . '</button>' . "\r\n\t\t\t" . '</div>' . "\r\n\r\n\t\t" . '</form>' . "\r\n\r\n\t" . '</div>' . "\r\n\r\n\r\n" . '</div>' . "\r\n" . '</main>' . "\r\n" . '<span id="openModal" href="javascript:void(0)" @click="openModal"></span>' . "\r\n" . '<div x-show="isModalOpen" x-transition:enter="transition ease-out duration-150" x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100" x-transition:leave="transition ease-in duration-150" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0" class="fixed inset-0 z-30 flex items-end bg-black bg-opacity-50 sm:items-center sm:justify-center" style="display: none;">' . "\r\n\t" . '<!-- Modal -->' . "\r\n\t" . '<div x-show="isModalOpen" x-transition:enter="transition ease-out duration-150" x-transition:enter-start="opacity-0 transform translate-y-1/2" x-transition:enter-end="opacity-100" x-transition:leave="transition ease-in duration-150" x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0  transform translate-y-1/2" @click.away="closeModal" @keydown.escape="closeModal" class="w-full px-6 py-4 overflow-hidden bg-white rounded-t-lg dark:bg-gray-800 sm:rounded-lg sm:m-4 sm:max-w-xl" role="dialog" id="modal" style="display: none;">' . "\r\n\t\t" . '<!-- Remove header if you don\'t want a close icon. Use modal body to place modal tile. -->' . "\r\n\t\t" . '<header class="flex justify-end">' . "\r\n\t\t\t" . '<button class="inline-flex items-center justify-center w-6 h-6 text-gray-400 transition-colors duration-150 rounded dark:hover:text-gray-200 hover: hover:text-gray-700" aria-label="close" @click="closeModal">' . "\r\n\t\t\t\t" . '<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20" role="img" aria-hidden="true">' . "\r\n\t\t\t\t\t" . '<path d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" fill-rule="evenodd"></path>' . "\r\n\t\t\t\t" . '</svg>' . "\r\n\t\t\t" . '</button>' . "\r\n\t\t" . '</header>' . "\r\n\t\t" . '<div class="mt-4 mb-6">' . "\r\n\t\t\t" . '<p class="mb-2 text-lg font-semibold text-gray-700 dark:text-gray-300">' . "\r\n\t\t\t\t" . 'Parabéns!' . "\r\n\t\t\t" . '</p>' . "\r\n\t\t\t" . '<p class="text-sm text-gray-700 dark:text-gray-400">' . "\r\n\t\t\t\t" . 'Alterações salvas com sucesso!' . "\r\n\t\t\t" . '</p>' . "\r\n\t\t" . '</div>' . "\r\n\r\n\t" . '</div>' . "\r\n" . '</div>' . "\r\n" . '<script>' . "\r\n\t" . 'var pageToken = \'gateway\'; ' . "\r\n\t" . '$("#tabs a").click(function() {' . "\r\n\t\t" . 'var selectedTab = $(this).attr("href");' . "\r\n\t\t" . '$("#tabs a").removeClass("active-tab");' . "\r\n\t\t" . '$(this).addClass("active-tab");' . "\r\n\t\t" . '$(".tabcontent").hide();' . "\r\n\t\t" . '$(selectedTab).show();' . "\r\n\t\t" . 'localStorage.setItem(\'selectedTab_\' + pageToken, pageToken + \'_\' + selectedTab);' . "\r\n\t\t" . 'return false;' . "\r\n\t" . '});' . "\r\n\t" . '$(document).ready(function(){' . "\r\n\t\t" . 'var storedTab = localStorage.getItem(\'selectedTab_\' + pageToken);' . "\r\n\t\t" . 'if (storedTab) {' . "\r\n\t\t\t" . 'var selectedTab = storedTab.substring(pageToken.length + 1);' . "\r\n\t\t\t" . '$("#tabs a").removeClass("active-tab");' . "\r\n\t\t\t" . '$(selectedTab).addClass("active-tab");' . "\r\n\t\t\t" . '$(".tabcontent").hide();' . "\r\n\t\t\t" . '$(selectedTab).show();' . "\r\n\t\t" . '}' . "\t\r\n\r\n\r\n\t\t" . 'if($(\'#mercadopago\').is(":checked")){' . "\r\n\t\t\t" . '$(\'.mercadopago\').show();' . "\r\n\t\t" . '}else{' . "\r\n\t\t\t" . '$(\'.mercadopago\').hide();' . "\t\r\n\t\t" . '}' . "\r\n\t\t" . '$(\'#mercadopago\').change(function() {' . "\r\n\t\t\t" . 'if($(\'#mercadopago\').is(":checked")){' . "\r\n\t\t\t\t" . '$(\'.mercadopago\').show();' . "\r\n\t\t\t" . '}else{' . "\r\n\t\t\t\t" . '$(\'.mercadopago\').hide();' . "\t\r\n\t\t\t" . '}' . "\r\n\t\t" . '});' . "\r\n\r\n\t\t" . 'if($(\'#pay2m\').is(":checked")){' . "\r\n\t\t\t" . '$(\'.pay2m\').show();' . "\r\n\t\t" . '}else{' . "\r\n\t\t\t" . '$(\'.pay2m\').hide();' . "\t\r\n\t\t" . '}' . "\r\n\t\t" . '$(\'#pay2m\').change(function() {' . "\r\n\t\t\t" . 'if($(\'#pay2m\').is(":checked")){' . "\r\n\t\t\t\t" . '$(\'.pay2m\').show();' . "\r\n\t\t\t" . '}else{' . "\r\n\t\t\t\t" . '$(\'.pay2m\').hide();' . "\t\r\n\t\t\t" . '}' . "\r\n\t\t" . '});' . "\r\n\r\n\t\t" . 'if($(\'#gerencianet\').is(":checked")){' . "\r\n\t\t\t" . '$(\'.gerencianet\').show();' . "\r\n\t\t" . '}else{' . "\r\n\t\t\t" . '$(\'.gerencianet\').hide();' . "\t\r\n\t\t" . '}' . "\r\n\t\t" . '$(\'#gerencianet\').change(function() {' . "\r\n\t\t\t" . 'if($(\'#gerencianet\').is(":checked")){' . "\r\n\t\t\t\t" . '$(\'.gerencianet\').show();' . "\r\n\t\t\t" . '}else{' . "\r\n\t\t\t\t" . '$(\'.gerencianet\').hide();' . "\t\r\n\t\t\t" . '}' . "\r\n\t\t" . '}); ' . "\r\n\t\t" . 'if($(\'#paggue\').is(":checked")){' . "\r\n\t\t\t" . '$(\'.paggue\').show();' . "\r\n\t\t" . '}else{' . "\r\n\t\t\t" . '$(\'.paggue\').hide();' . "\t\r\n\t\t" . '}' . "\r\n\t\t" . '$(\'#paggue\').change(function() {' . "\r\n\t\t\t" . 'if($(\'#paggue\').is(":checked")){' . "\r\n\t\t\t\t" . '$(\'.paggue\').show();' . "\r\n\t\t\t" . '}else{' . "\r\n\t\t\t\t" . '$(\'.paggue\').hide();' . "\t\r\n\t\t\t" . '}' . "\r\n\t\t" . '});' . "\r\n\t\t" . 'if($(\'#openpix\').is(":checked")){' . "\r\n\t\t\t" . '$(\'.openpix\').show();' . "\r\n\t\t" . '}else{' . "\r\n\t\t\t" . '$(\'.openpix\').hide();' . "\t\r\n\t\t" . '}' . "\r\n\t\t" . '$(\'#openpix\').change(function() {' . "\r\n\t\t\t" . 'if($(\'#openpix\').is(":checked")){' . "\r\n\t\t\t\t" . '$(\'.openpix\').show();' . "\r\n\t\t\t" . '}else{' . "\r\n\t\t\t\t" . '$(\'.openpix\').hide();' . "\t\r\n\t\t\t" . '}' . "\r\n\t\t" . '}); ' . "\r\n" . '// Fim ranking' . "\r\n\r\n\r\n" . '//Save products' . "\r\n\t\t" . '$(\'#gateway-form\').submit(function(e){' . "\r\n\t\t\t\t" . 'e.preventDefault();' . "\r\n\t\t\t\t" . '$.ajax({' . "\r\n\t\t\t\t\t" . 'url:_base_url_+\'class/System.php?action=update_system\',' . "\r\n\t\t\t\t\t" . 'data: new FormData($(this)[0]),' . "\r\n\t\t\t\t\t" . 'cache: false,' . "\r\n\t\t\t\t\t" . 'contentType: false,' . "\r\n\t\t\t\t\t" . 'processData: false,' . "\r\n\t\t\t\t\t" . 'method: \'POST\',' . "\r\n\t\t\t\t\t" . 'type: \'POST\',' . "\r\n\t\t\t\t\t" . 'success:function(resp){' . "\r\n\t\t\t\t\t\t" . 'var returnedData = JSON.parse(resp);' . "\r\n\t\t\t\t\t\t" . 'if(returnedData.status == \'success\'){' . "\r\n\t\t\t\t\t\t\t" . 'alert(\'Configurações salvas com sucesso!\');' . "\r\n\t\t\t\t\t\t\t" . 'location.reload();' . "\r\n\t\t\t\t\t\t" . '}else{' . "\r\n\t\t\t\t\t\t\t" . 'alert(\'Ops\');' . "\r\n\t\t\t\t\t\t" . '}' . "\r\n\t\t\t\t\t" . '}' . "\r\n\t\t\t\t" . '})' . "\r\n\t\t" . '})' . "\r\n" . '//End save products' . "\r\n\r\n\t" . '});' . "\r\n\r\n" . '</script>';

?>