Skip to content

Commit

Permalink
PagBank 😍 Magento
Browse files Browse the repository at this point in the history
  • Loading branch information
elisei committed Oct 10, 2023
1 parent 0c8c43d commit 5dad6d1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Gateway/Request/ItemsDataRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ public function getPurchaseItems(
continue;
}

$productName = preg_replace('/[^\p{L}0-9\s]/u', '', $item->getName());
$productName = preg_replace('/[^a-zA-Z0-9áàâãéèêíìóòôõúùçñÁÀÂÃÉÈÊÍÌÓÒÔÕÚÙÇ ]/u', '', $item->getName());

$result[] = [
self::ITEM_REFERENCE_ID => substr($item->getSku(), 0, 60),
self::ITEM_REFERENCE_ID => substr($item->getSku(), 0, 55),
self::ITEM_NAME => substr($productName, 0, 55),
self::ITEM_QUANTITY => $item->getQtyOrdered(),
self::ITEM_UNIT_AMOUNT => $this->config->formatPrice($item->getPrice()),
Expand Down
2 changes: 1 addition & 1 deletion Gateway/Response/FetchPaymentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function handle(array $handlingSubject, array $response)
*/
public function findForPaymentStatus($response, $charges)
{
$isPix = isset($response[self::RESPONSE_QR_CODES]) ? true : false;
$isPix = isset($response[self::RESPONSE_QR_CODES]);
$isTempCancel = false;

foreach ($charges as $charge) {
Expand Down
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<label><![CDATA[<div class='pagbank-payment-logo'></div><div class='pagbank-payment-byline'><p><b>PagBank</b> is a company within the UOL group.</p><p>PagBank is the <b>pioneer and leader</b> in the Brazilian online payment market, with a complete portfolio for your business.</p></div>]]></label>
<fieldset_css>complex pagbank-payment-section</fieldset_css>
<frontend_model>PagBank\PaymentMagento\Model\Adminhtml\Source\PaymentGroup</frontend_model>
<comment><![CDATA[Technical support available <a href="https://github.com/pagbank/payment-magento/issues/new/choose">here</a>.]]></comment>
<comment><![CDATA[Technical support available <a href="https://github.com/pagseguro/payment-magento/issues/new/choose">here</a>.]]></comment>
<include path="PagBank_PaymentMagento::system/base_settings.xml"/>
<include path="PagBank_PaymentMagento::system/credit_card.xml"/>
<include path="PagBank_PaymentMagento::system/pix.xml"/>
Expand Down
2 changes: 1 addition & 1 deletion etc/adminhtml/system/developers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="developers" translate="label comment" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Developers</label>
<comment><![CDATA[Meet our <a href='https://github.com/pagbank/payment-magento/wiki'>Wiki</a>.]]></comment>
<comment><![CDATA[Meet our <a href='https://github.com/pagseguro/payment-magento/wiki'>Wiki</a>.]]></comment>
<field id="debug" translate="label comment" type="select" sortOrder="110" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
<label>Debug</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
Expand Down
4 changes: 2 additions & 2 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ expires,expires
"Permission for config PagBank","Permission for config PagBank"
"Permission for clear config PagBank","Permission for clear config PagBank"
"<div class='pagbank-payment-logo'></div><div class='pagbank-payment-byline'><p><b>PagBank</b> is a company within the UOL group.</p><p>PagBank is the <b>pioneer and leader</b> in the Brazilian online payment market, with a complete portfolio for your business.</p></div>","<div class='pagbank-payment-logo'></div><div class='pagbank-payment-byline'><p><b>PagBank</b> is a company within the UOL group.</p><p>PagBank is the <b>pioneer and leader</b> in the Brazilian online payment market, with a complete portfolio for your business.</p></div>"
"Technical support available <a href=""https://github.com/pagbank/payment-magento/issues/new/choose"">here</a>.","Technical support available <a href=""https://github.com/pagbank/payment-magento/issues/new/choose"">here</a>."
"Technical support available <a href=""https://github.com/pagseguro/payment-magento/issues/new/choose"">here</a>.","Technical support available <a href=""https://github.com/pagseguro/payment-magento/issues/new/choose"">here</a>."
Credentials,Credentials
"Define the relationship between your store and our application.","Define the relationship between your store and our application."
"Statement Descriptor","Statement Descriptor"
Expand Down Expand Up @@ -169,7 +169,7 @@ Title,Title
"The minimum installment price","The minimum installment price"
"It is the minimum value that the installment can have,"It is the minimum value that the installment can have"
Developers,Developers
"Meet our <a href='https://github.com/pagbank/payment-magento/wiki'>Wiki</a>.","Meet our <a href='https://github.com/pagbank/payment-magento/wiki'>Wiki</a>."
"Meet our <a href='https://github.com/pagseguro/payment-magento/wiki'>Wiki</a>.","Meet our <a href='https://github.com/pagseguro/payment-magento/wiki'>Wiki</a>."
Debug,Debug
"Attention, you cannot use debug in production mode.","Attention, you cannot use debug in production mode."
"Account Id","Account Id"
Expand Down
4 changes: 2 additions & 2 deletions i18n/pt_BR.csv
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ expires,expirando
"Permission for config PagBank","Permissão para configurar o PagBank"
"Permission for clear config PagBank","Permissão para apagar a configuração do PagBank"
"<div class='pagbank-payment-logo'></div><div class='pagbank-payment-byline'><p><b>PagBank</b> is a company within the UOL group.</p><p>PagBank is the <b>pioneer and leader</b> in the Brazilian online payment market, with a complete portfolio for your business.</p></div>","<div class='pagbank-payment-logo'></div><div class='pagbank-payment-byline'><p><b>PagBank</b> é uma empresa do grupo UOL.</p><p>O PagBank é o <b>pioneiro e líder</b> no mercado brasileiro de meios de pagamentos online, possui um portfólio completo para o seu negócio.</p></div>"
"Technical support available <a href=""https://github.com/pagbank/payment-magento/issues/new/choose"">here</a>.","Suporte técnico disponível <a href=""https://github.com/pagbank/payment-magento/issues/new/choose"">aqui</a>."
"Technical support available <a href=""https://github.com/pagseguro/payment-magento/issues/new/choose"">here</a>.","Suporte técnico disponível <a href=""https://github.com/pagseguro/payment-magento/issues/new/choose"">aqui</a>."
Credentials,Credenciais
"Define the relationship between your store and our application.","Defina a relação entre sua loja e nosso aplicativo."
"Statement Descriptor","Nome da Loja"
Expand Down Expand Up @@ -169,7 +169,7 @@ Title,Título
"The minimum installment price","O preço mínimo da parcela"
"It is the minimum value that the installment can have","É o valor mínimo que a parcela pode ter"
Developers,Desenvolvedores
"Meet our <a href='https://github.com/pagbank/payment-magento/wiki'>Wiki</a>.","Conheça a nossa <a href='https://github.com/pagbank/payment-magento/wiki'>Wiki</a>."
"Meet our <a href='https://github.com/pagseguro/payment-magento/wiki'>Wiki</a>.","Conheça a nossa <a href='https://github.com/pagseguro/payment-magento/wiki'>Wiki</a>."
Debug,Debug
"Attention, you cannot use debug in production mode.","Atenção, você não pode usar o debug no modo de produção."
"Account Id","Código da Conta"
Expand Down

0 comments on commit 5dad6d1

Please sign in to comment.