Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #92 from amandaisabelalima/pagseguro-online-debit
Browse files Browse the repository at this point in the history
Fix pagseguro online debit options available to the client
  • Loading branch information
s2it-moscou authored Jun 6, 2018
2 parents 5941967 + 2d753c3 commit 51c2bf2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changelog
---------
3.16.2
- Fix: exibição das opções de banco no método de pagamento Débito Online

3.16.1
- Fix: redirecionamento para tela de erro caso ocorra algum problema no checkout padrão ou lightbox

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Com o módulo instalado e configurado, você pode pode oferecer o PagSeguro como
- Certifique-se de que não há instalação de outros módulos para o PagSeguro em seu sistema;
- Caso utilize a compilação do Magento, desative-a e limpe-a *(Sistema -> Ferramentas -> Compilação)*;
- Baixe a última versão do módulo **[nesse link](https://github.com/pagseguro/magento/raw/master/UOL_PagSeguro-3.16.1.tgz)** ou então baixe o repositório como arquivo zip através do botão do GitHub;
- Baixe a última versão do módulo **[nesse link](https://github.com/pagseguro/magento/raw/master/UOL_PagSeguro-3.16.2.tgz)** ou então baixe o repositório como arquivo zip através do botão do GitHub;
- Na área administrativa do seu Magento, acesse o menu *Sistema/System -> Magento Connect -> Magento Connect Manager*. Caso tenha uma versão anterior do módulo instalada faça a remoção agora;
- No Magento Connect Manger, dentro da seção Direct package file upload, clique em **Escolher arquivo/Choose file**, selecione o arquivo UOL_PagSeguro-x.x.x.tgz (baixado anteriormente), clique no botão de upload e acompanhe a instalação do módulo no console da página;
- Caso utilize a compilação, volte para a área administrativa do Magento, ative-a e execute-a novamente;
Expand Down
Binary file removed UOL_PagSeguro-3.16.1.tgz
Binary file not shown.
Binary file added UOL_PagSeguro-3.16.2.tgz
Binary file not shown.
8 changes: 2 additions & 6 deletions UOL_PagSeguro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@
<description>Aceite mais de 25 meios de pagamentos com apenas 1 contrato. Seus clientes podem parcelar no cartão em até 18x e se preferir, você também pode oferecer parcelamento sem acréscimo.</description>
<license>Apache Software License</license>
<license_uri>http://opensource.org/licenses/apachepl.php</license_uri>
<version>3.16.1</version>
<version>3.16.2</version>
<stability>stable</stability>
<notes>- Add PagSeguro status to magento state configuration
- Retry payment page when checkout finishes with error
- Compatibility with IWD OnePageCheckout
- Allow to customize direct payment with credit card success page
- Fixes: lightbox in production</notes>
<notes>- Fix of the list view of banks in online debit</notes>
<authors>
<name>
<name>pagseguro</name>
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/UOL/PagSeguro/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
<config>
<modules>
<UOL_PagSeguro>
<version>3.16.1</version>
<version>3.16.2</version>
</UOL_PagSeguro>
</modules>
<global>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,35 @@

<script>
//<![CDATA[
var pagseguro_onlinedebit_dt = jQuery('#dt_method_<?php echo $this->getMethodCode() ?>')
var pagseguro_online_debit_options = jQuery('#pagseguro-online-debit-options')
paymentMethods()
var OnlinedebitOptions = false
paymentMethods();

pagseguroOnlinedebitOptions = function (res) {
var pagseguro_onlinedebit_dt = jQuery('#dt_method_<?php echo $this->getMethodCode() ?>');
var pagseguro_online_debit_options = jQuery('#pagseguro-online-debit-options');
var OnlinedebitOptions = false;

if (!OnlinedebitOptions) {
if (!res['error']) {
if (res['paymentMethods'] && res['paymentMethods']['ONLINE_DEBIT'] && res['paymentMethods']['ONLINE_DEBIT']['options']) {
var k = 0
pagseguro_online_debit_options.empty()
var k = 0;
pagseguro_online_debit_options.empty();
jQuery.each(res['paymentMethods']['ONLINE_DEBIT']['options'], function (i, item) {
if (item['status'] === 'AVAILABLE') {
++k
++k;
if (k > 0) {
pagseguro_onlinedebit_dt.show()
pagseguro_onlinedebit_dt.show();
}
pagseguro_online_debit_options.append('<div><label>' +
'<input class="input-radio required-entry" type="radio" id="debitbankName" name="debitbankName" value="' + i + '" required onclick="validateDebitBankName(this)">'
+ item['displayName'] + '</label></div>')
+ item['displayName'] + '</label></div>');
}
})
});
if (k === 0) {
pagseguro_onlinedebit_dt.find('input').prop('disabled', true)
pagseguro_onlinedebit_dt.find('input').prop('disabled', true);
}
}
} else {
console.log(res['error'])
console.log(res['error']);
}
}
}
Expand Down

0 comments on commit 51c2bf2

Please sign in to comment.