Skip to content

Commit

Permalink
PagBank 😍 Magento
Browse files Browse the repository at this point in the history
- Adiciona novos APP's para taxas promocionais.
  • Loading branch information
elisei committed Dec 3, 2024
1 parent 0b7f647 commit 3705ba1
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 61 deletions.
4 changes: 2 additions & 2 deletions Gateway/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ class Config extends PaymentConfig
/**
* @const string
*/
public const APP_ID_THIRTY_PRODUCTION = '4875151e-9caa-4019-b6b7-d29852efe7ee';
public const APP_ID_THIRTY_PRODUCTION = 'fd0305da-da00-42b6-a9f4-dac498bc05e4';

/**
* @const string
*/
public const APP_ID_FOURTEEN_PRODUCTION = 'fd0305da-da00-42b6-a9f4-dac498bc05e4';
public const APP_ID_FOURTEEN_PRODUCTION = '4875151e-9caa-4019-b6b7-d29852efe7ee';
/**
* @const string
*/
Expand Down
8 changes: 4 additions & 4 deletions etc/adminhtml/system/base_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
*/
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<!-- <field id="pagbank_apps" translate="label comment" type="text" sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="0">
<field id="pagbank_apps" translate="label comment" type="text" sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="0">
<frontend_model>PagBank\PaymentMagento\Block\Adminhtml\System\Config\Apps</frontend_model>
</field> -->
</field>
<group id="settings" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Credentials</label>
<comment>Define the relationship between your store and our application.</comment>
Expand All @@ -27,12 +27,12 @@
<config_path>payment/pagbank_paymentmagento/environment</config_path>
<validate>required-entry validate-select</validate>
</field>
<!-- <field id="type_app" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<field id="type_app" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
<label>Receipt Type</label>
<source_model>PagBank\PaymentMagento\Model\Adminhtml\Source\TypeApp</source_model>
<config_path>payment/pagbank_paymentmagento/type_app</config_path>
<validate>required-entry validate-select</validate>
</field> -->
</field>
<field id="oauth" translate="label comment" type="button" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="0">
<frontend_model>PagBank\PaymentMagento\Block\Adminhtml\System\Config\Oauth</frontend_model>
<label>Module Authorization</label>
Expand Down
29 changes: 28 additions & 1 deletion i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Close,Close
"4st line of the street","4st line of the street"
"by customer form (taxvat - customer account)","by customer form (taxvat - customer account)"
"by address form (vat_id - checkout)","by address form (vat_id - checkout)"
"Set in your Account","Set in your Account"
"Receive within 14 days","Receive within 14 days"
"Receive within 30 days","Receive within 30 days"
"Cart %1 doesn't contain products","Cart %1 doesn't contain products"
"Unable to save interest.","Unable to save interest."
"Refresh Token for Default Store.","Refresh Token for Default Store."
Expand Down Expand Up @@ -99,6 +102,31 @@ Link,Link
"Payer Phone","Payer Phone"
"Pix Qr Code","Pix Qr Code"
"Pix Copy and Paste","Pix Copy and Paste"
"Know and compare our <b>promotional plans</b>","Know and compare our <b>promotional plans</b>"
"Magento and Adobe Commerce - Account Profile","Magento and Adobe Commerce - Account Profile"
"Magento and Adobe Commerce - D14","Magento and Adobe Commerce - D14"
"Magento and Adobe Commerce - D30","Magento and Adobe Commerce - D30"
Benefits,Benefits
"Ideal for those who bill above R$ 200,000","Ideal for those who bill above R$ 200,000"
"Customized fees and receipts","Customized fees and receipts"
"Request your personalized proposal <a href=""%1"">here</a>","Request your personalized proposal <a href=""%1"">here</a>"
"Ideal for those who need greater cash flow","Ideal for those who need greater cash flow"
"Reduced fees","Reduced fees"
"Ideal for those who have greater cash flow","Ideal for those who have greater cash flow"
"The best market rates","The best market rates"
"Receipt Type","Receipt Type"
"As defined in your account","As defined in your account"
Fees*,Fees*
Card:,Card:
"With 3.97% fee.","With 3.97% fee."
Pix:,Pix:
"With 0.99% fee.","With 0.99% fee."
"With immediate receipt.","With immediate receipt."
"Bank Slip:","Bank Slip:"
"With fixed fee of R$ 2.99.","With fixed fee of R$ 2.99."
"With receipt within 2 business days.","With receipt within 2 business days."
"With 3.05% fee.","With 3.05% fee."
"* The fees advertised here may vary, please check our page for updated values.","* The fees advertised here may vary, please check our page for updated values."
"The Boleto barcode is","The Boleto barcode is"
Copy,Copy
Copied,Copied
Expand All @@ -109,7 +137,6 @@ Copied,Copied
"Go to the <strong>Pix/Qr Code</strong> option;","Go to the <strong>Pix/Qr Code</strong> option;"
"Select the option <strong>Pay with Qr Code</strong>;","Select the option <strong>Pay with Qr Code</strong>;"
"Scan the Qr Code:","Scan the Qr Code:"
"Pay in PagBank","Pay in PagBank"
"Atenção o Qr Code gerado <strong>só é válido para uso no aplicatico do PagBank.</strong>","Atenção o Qr Code gerado <strong>só é válido para uso no aplicatico do PagBank.</strong>"
"To pay, read the Qr Code","To pay, read the Qr Code"
"Or if you prefer, copy and paste the code","Or if you prefer, copy and paste the code"
Expand Down
28 changes: 28 additions & 0 deletions i18n/pt_BR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Close,Fechar
"4st line of the street","4ª linha de endereço"
"by customer form (taxvat - customer account)","pelo formulário de cliente (taxvat - customer account)"
"by address form (vat_id - checkout)","pelo formulário de endereço (vat_id - checkout)"
"Set in your Account","Definido em sua Conta"
"Receive within 14 days","Receba em até 14 dias"
"Receive within 30 days","Receba em até 30 dias"
"Cart %1 doesn't contain products","O carrinho %1 não contém produtos"
"Unable to save interest.","Não foi possível salvar o juros."
"Refresh Token for Default Store.","Refresh Token para Loja Padrão."
Expand Down Expand Up @@ -99,6 +102,31 @@ Link,Link
"Payer Phone","Telefone do Pagador"
"Pix Qr Code","Pix Qr Code"
"Pix Copy and Paste","Pix Cópia e Cola"
"Know and compare our <b>promotional plans</b>","Conheça e compare nossos <b>planos promocionais</b>"
"Magento and Adobe Commerce - Account Profile","Magento e Adobe Commerce - Account Profile"
"Magento and Adobe Commerce - D14","Magento e Adobe Commerce - D14"
"Magento and Adobe Commerce - D30","Magento e Adobe Commerce - D30"
Benefits,Vantagens
"Ideal for those who bill above R$ 200,000","Ideal para quem fatura acima de R$ 200.000"
"Customized fees and receipts","Taxas e recebimentos personalizados"
"Request your personalized proposal <a href=""%1"">here</a>","Solicite sua proposta personalizada <a href=""%1"">aqui</a>"
"Ideal for those who need greater cash flow","Ideal para quem precisa de maior fluxo de caixa"
"Reduced fees","Taxas reduzidas"
"Ideal for those who have greater cash flow","Ideal para quem tem maior fluxo de caixa"
"The best market rates","As melhores taxas do mercado"
"Receipt Type","Tipo de Recebimento"
"As defined in your account","Conforme definido em sua conta"
Fees*,Taxas*
Card:,Cartão:
"With 3.97% fee.","Com taxa de 3,97%."
Pix:,Pix:
"With 0.99% fee.","Com taxa de 0,99%."
"With immediate receipt.","Com recebimento imediato."
"Bank Slip:","Boleto:"
"With fixed fee of R$ 2.99.","Com taxa fixa de R$ 2,99."
"With receipt within 2 business days.","Com recebimento em até 2 dias úteis."
"With 3.05% fee.","Com taxa de 3.05%."
"* The fees advertised here may vary, please check our page for updated values.","* As taxas aqui anunciadas podem sofrer variações, consulte nossa página para os valores atualizados."
"The Boleto barcode is","O código de barras do boleto é"
Copy,Copiar
Copied,Copiado
Expand Down
104 changes: 50 additions & 54 deletions view/adminhtml/templates/system/config/apps.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,94 +13,90 @@
*/
?>
<div id="pagbank-type-apps" class="admin__table admin__table_apps_pagbank">
<h1><?= $block->escapeHtml(__('Conheça e compare nossos <b>planos promocionais</b>'), ['b']) ?></h1>
<h1><?= $block->escapeHtml(__('Know and compare our <b>promotional plans</b>'), ['b']) ?></h1>
<table id="pagbank-table-apps">
<tr>
<th class="feature"></th>
<th class="plan"><?= $block->escapeHtml(__('Magento e Adobe Commerce - Account Profile')) ?></th>
<th class="plan"><?= $block->escapeHtml(__('Magento e Adobe Commerce - D14')) ?></th>
<th class="plan"><?= $block->escapeHtml(__('Magento e Adobe Commerce - D30')) ?></th>
<th class="plan"><?= $block->escapeHtml(__('Magento and Adobe Commerce - Account Profile')) ?></th>
<th class="plan"><?= $block->escapeHtml(__('Magento and Adobe Commerce - D14')) ?></th>
<th class="plan"><?= $block->escapeHtml(__('Magento and Adobe Commerce - D30')) ?></th>
</tr>
<tr>
<td class="feature"><?= $block->escapeHtml(__('Tipo de Recebimento')) ?></td>
<td><?= $block->escapeHtml(__('Conforme definido em sua conta')) ?></td>
<td><?= $block->escapeHtml(__('Receba em até 14 dias')) ?></td>
<td><?= $block->escapeHtml(__('Receba em até 30 dias')) ?></td>
</tr>
<tr>
<td class="feature"><?= $block->escapeHtml(__('Taxas*')) ?></td>
<td><?= $block->escapeHtml(__('Conforme definido em sua conta')) ?></td>
<td class="feature"><?= $block->escapeHtml(__('Benefits')) ?></td>
<td>
<?= $block->escapeHtml(__('Cartão:')) ?>
<ul>
<li><?= $block->escapeHtml(__('1x com taxa de 1.69%')) ?></li>
<li><?= $block->escapeHtml(__('2x a 4x com taxa de 1.99%')) ?></li>
<li><?= $block->escapeHtml(__('5x a 18x com taxa de 1.99%')) ?></li>
<li><?= $block->escapeHtml(__('Ideal for those who bill above R$ 200,000')) ?></li>
<li><?= $block->escapeHtml(__('Customized fees and receipts')) ?></li>
<li>
<?= $block->escapeHtml(
__(
'Request your personalized proposal <a href="%1">here</a>',
'https://pagseguro.uol.com.br/campanhas/contato/?parceiro=aec'
),
['a']
) ?>
</li>
</ul>
<?= $block->escapeHtml(__('Pix:')) ?>
</td>
<td>
<ul>
<li><?= $block->escapeHtml(__('Fixa em R$ 0,50')) ?></li>
<li><?= $block->escapeHtml(__('Ideal for those who need greater cash flow')) ?></li>
<li><?= $block->escapeHtml(__('Reduced fees')) ?></li>
</ul>
<?= $block->escapeHtml(__('Boleto:')) ?>
</td>
<td>
<ul>
<li><?= $block->escapeHtml(__('Fixa em R$ 0,50')) ?></li>
<li><?= $block->escapeHtml(__('Ideal for those who have greater cash flow')) ?></li>
<li><?= $block->escapeHtml(__('The best market rates')) ?></li>
</ul>
</td>
</tr>
<tr>
<td class="feature"><?= $block->escapeHtml(__('Receipt Type')) ?></td>
<td><?= $block->escapeHtml(__('As defined in your account')) ?></td>
<td><?= $block->escapeHtml(__('Receive within 14 days')) ?></td>
<td><?= $block->escapeHtml(__('Receive within 30 days')) ?></td>
</tr>
<tr>
<td class="feature"><?= $block->escapeHtml(__('Fees*')) ?></td>
<td><?= $block->escapeHtml(__('As defined in your account')) ?></td>
<td>
<?= $block->escapeHtml(__('Cartão:')) ?>
<?= $block->escapeHtml(__('Card:')) ?>
<ul>
<li><?= $block->escapeHtml(__('1x com taxa de 1.69%')) ?></li>
<li><?= $block->escapeHtml(__('2x a 4x com taxa de 1.99%')) ?></li>
<li><?= $block->escapeHtml(__('5x a 18x com taxa de 1.99%')) ?></li>
<li><?= $block->escapeHtml(__('With 3.97% fee.')) ?></li>
</ul>
<?= $block->escapeHtml(__('Pix:')) ?>
<ul>
<li><?= $block->escapeHtml(__('Fixa em R$ 0,50')) ?></li>
<li><?= $block->escapeHtml(__('With 0.99% fee.')) ?></li>
<li><?= $block->escapeHtml(__('With immediate receipt.')) ?></li>
</ul>
<?= $block->escapeHtml(__('Boleto:')) ?>
<?= $block->escapeHtml(__('Bank Slip:')) ?>
<ul>
<li><?= $block->escapeHtml(__('Fixa em R$ 0,50')) ?></li>
<li><?= $block->escapeHtml(__('With fixed fee of R$ 2.99.')) ?></li>
<li><?= $block->escapeHtml(__('With receipt within 2 business days.')) ?></li>
</ul>
</td>
</tr>
<tr>
<td class="feature"><?= $block->escapeHtml(__('Vantagens')) ?></td>
<td>
<?= $block->escapeHtml(__('Card:')) ?>
<ul>
<li><?= $block->escapeHtml(__('Ideal para quem fatura acima de R$ 300.000')) ?></li>
<li><?= $block->escapeHtml(__('Taxas e recebimentos personalizados')) ?></li>
<li><?= $block->escapeHtml(__('With 3.05% fee.')) ?></li>
</ul>
</td>
<td>
<?= $block->escapeHtml(__('Pix:')) ?>
<ul>
<li><?= $block->escapeHtml(__('Ideal para quem precisa de maior fluxo de caixa')) ?></li>
<li><?= $block->escapeHtml(__('Taxas reduzidas')) ?></li>
<li><?= $block->escapeHtml(__('With 0.99% fee.')) ?></li>
<li><?= $block->escapeHtml(__('With immediate receipt.')) ?></li>
</ul>
</td>
<td>
<?= $block->escapeHtml(__('Bank Slip:')) ?>
<ul>
<li><?= $block->escapeHtml(__('Ideal para quem tem maior fluxo de caixa')) ?></li>
<li><?= $block->escapeHtml(__('As melhores taxas do mercado')) ?></li>
<li><?= $block->escapeHtml(__('With fixed fee of R$ 2.99.')) ?></li>
<li><?= $block->escapeHtml(__('With receipt within 2 business days.')) ?></li>
</ul>
</td>
</tr>
<tr>
<td class="feature"><?= $block->escapeHtml(__('Estado')) ?></td>
<td>
<?= $block->escapeHtml(__('Esse plano <b>está configurado e em uso</b> atualmente.'), ['b']) ?>
</td>
<td>
<?= $block->escapeHtml(__('Esse plano <b>está configurado</b> mas <b>não está em uso</b>.'), ['b']) ?>
<?= $block->escapeHtml(__('Para usar esse plano, selecione na guia credenciais.')) ?>
</td>
<td>
<?= $block->escapeHtml(__('Para usar esse plano, selecione na guia credenciais.')) ?>
</td>
</tr>
</table>
<p class="note">
<?= $block->escapeHtml(
__('* As taxas aqui anunciadas podem sofrer variações, consulte nossa página para os valores atualizados.')
__('* The fees advertised here may vary, please check our page for updated values.')
) ?>
</p>
</div>

0 comments on commit 3705ba1

Please sign in to comment.