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

Fix 'CPF invalido' on boleto method and fix credit payment method #153

Open
wants to merge 99 commits into
base: desenvolvimento
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
ce1f487
Update composer.json
pedromazala Oct 2, 2017
e008e7a
Update composer.json
pedromazala Oct 2, 2017
e76d9c8
Update README.md
pedromazala Oct 2, 2017
400f94b
Merge pull request #88 from pagseguro/desenvolvimento
s2it-moscou Dec 26, 2017
5c37284
Fix resources structure on acl file
thalessan Jan 23, 2018
c1d46b4
fix: Cache of checkout page (lightbox)
Thiago-Medeiros Feb 8, 2018
70d6978
Merge pull request #91 from thalessan/master
s2it-moscou Feb 8, 2018
258611f
Merge pull request #95 from Thiago-Medeiros/fix-lightbox-checkout-cache
s2it-moscou Feb 8, 2018
735ab30
Update Abandoned.php
gcampedelli Feb 26, 2018
a2cfc28
Update Cancellation.php
gcampedelli Feb 26, 2018
cd69b67
Update Conciliation.php
gcampedelli Feb 26, 2018
76eca9b
Update Refund.php
gcampedelli Feb 26, 2018
f0b4991
Update direct-payment-validator.js
gcampedelli Feb 26, 2018
cc553c3
Update credit-card-form.html
gcampedelli Feb 26, 2018
7e7d736
adding basic structure to list transactions
andrecristiani Mar 20, 2018
189b93d
modal and value validation
andrecristiani Mar 21, 2018
5aef322
partial refund finalized
andrecristiani Mar 23, 2018
c995000
feature: add checkout without address
gabriellucius Mar 24, 2018
412db27
feature: add PagSeguro recovery cart configuration in admin
gabriellucius Mar 24, 2018
7e93a1c
partial refund finalized
andrecristiani Mar 27, 2018
17eb513
updating message header
andrecristiani Mar 27, 2018
c85b5e3
adding messages to multiple errors
andrecristiani Mar 27, 2018
8d76712
correção verificação da data
andrecristiani Mar 27, 2018
8e7eaf8
feat: backend list transactions
amandaisabelalima Mar 28, 2018
d274df5
Merge remote-tracking branch 'origin/list-transactions' into list-tra…
amandaisabelalima Mar 28, 2018
b4921cb
feat: backend list transactions
amandaisabelalima Mar 28, 2018
ef6b67b
fix: completion of the transaction list backend
amandaisabelalima Mar 28, 2018
e99da4f
fix: completion of the transaction list backend
amandaisabelalima Mar 28, 2018
fbb1a69
adding filter in the first column
andrecristiani Mar 29, 2018
f0e8015
Merge branch 'list-transactions' of https://github.com/gabriellucius/…
andrecristiani Mar 29, 2018
f68e4ed
adding css to table adaptation
andrecristiani Mar 29, 2018
a4995a5
fix: when opening modal redirect to dashboard
andrecristiani Mar 29, 2018
30167d4
fix: type error in Transactions list
andrecristiani Mar 29, 2018
d48787f
feature: add discount by payment method in checkout default/lightbox
gabriellucius Mar 29, 2018
7bb1108
add payment method discount description to README.md
gabriellucius Mar 29, 2018
8e57f60
spinner when loading transaction list
andrecristiani Apr 2, 2018
7c9770b
fix: modal closure when clicking outside the window
andrecristiani Apr 2, 2018
f84e20f
fix: correcting the modal overlay
andrecristiani Apr 2, 2018
b36a292
feat: partial refund backend
amandaisabelalima Apr 4, 2018
89e7b81
Merge branch 'partial-refund' of https://github.com/gabriellucius/mag…
amandaisabelalima Apr 4, 2018
3539a48
fix: get id magento in refund modal
amandaisabelalima Apr 4, 2018
f3e6431
fix: completion of the transaction list backend
amandaisabelalima Apr 4, 2018
4536cc8
Merge pull request #108 from gabriellucius/checkout-improvements
s2it-moscou Apr 5, 2018
1fb3aa7
Merge pull request #109 from gabriellucius/list-transactions
s2it-moscou Apr 5, 2018
3e26b9c
Merge branch 'master' of https://github.com/gabriellucius/magento2 in…
gabriellucius Apr 5, 2018
7d8ffb7
Merge pull request #110 from gabriellucius/discount-configuration
s2it-moscou Apr 5, 2018
30898ca
Merge branch 'master' into partial-refund
gabriellucius Apr 6, 2018
54c6d8b
add partially refunded status filter in list transaction
gabriellucius Apr 6, 2018
2b789fc
update README.md and add CHANGELOG.md
gabriellucius Apr 9, 2018
1f5ef3e
improvements in list transactions related to partially refunded orders
gabriellucius Apr 10, 2018
c9dbe53
fix typo error
gabriellucius Apr 10, 2018
bb6e6ea
Merge pull request #111 from gabriellucius/partial-refund
s2it-moscou Apr 10, 2018
1f69cb6
Update direct-payment-validator.js
gcampedelli Apr 23, 2018
b41b5d4
Update php required version
ianitsky Aug 26, 2018
a8792c5
add: modelo para criar novas issues
geekcom Dec 14, 2018
d30a9bd
Fix: Magento 2.3 302 redirect
ianitsky Feb 12, 2019
44158f5
Fix: Add class to good practices
ianitsky Mar 10, 2019
798decf
Remover versões não testadas.
Sena May 20, 2019
df8031e
Merge pull request #131 from Sena/patch-1
pserjunior May 20, 2019
842fd38
Merge branch 'master' into master
raphaelrejes Jun 30, 2020
ea969a5
Merge pull request #81 from db1globalsoftware/master
raphaelrejes Jun 30, 2020
198e03d
Merge pull request #102 from gcampedelli/patch-5
raphaelrejes Jun 30, 2020
71369b8
Merge pull request #98 from gcampedelli/patch-1
raphaelrejes Jun 30, 2020
4ca333d
Merge pull request #99 from gcampedelli/patch-2
raphaelrejes Jun 30, 2020
2fb524d
Merge pull request #100 from gcampedelli/patch-3
raphaelrejes Jun 30, 2020
624186b
Merge pull request #101 from gcampedelli/patch-4
raphaelrejes Jun 30, 2020
a956293
Merge pull request #103 from gcampedelli/patch-6
raphaelrejes Jun 30, 2020
9066a23
Merge pull request #128 from ianitsky/PullRequests
raphaelrejes Jun 30, 2020
23508fa
Merge branch 'master' into develop
raphaelrejes Jul 1, 2020
996a308
Merge pull request #138 from pagseguro/develop
raphaelrejes Jul 1, 2020
728f2bb
Update composer.json
raphaelrejes Sep 8, 2020
d467554
Support PHP 7.4 and Magento 2.4
andreustimm Oct 12, 2020
c799d53
Support PHP 7.4 and Magento 2.4 - Property "DisableTmpl" does not hav…
andreustimm Oct 12, 2020
46f6f40
Create codeql-analysis.yml
raphaelrejes Oct 20, 2020
5931069
Delete codeql-analysis.yml
raphaelrejes Oct 20, 2020
722f615
Create codeql-analysis.yml
raphaelrejes Oct 20, 2020
0a53418
Merge pull request #141 from Zorbit/master
raphaelrejes Nov 13, 2020
c9f25f4
Create codacy-analysis.yml
raphaelrejes Nov 18, 2020
c2098d0
Create SECURITY.md
raphaelrejes Nov 18, 2020
9e27cfb
The use of function is_null() is discouraged; use strict comparison "…
raphaelrejes Nov 18, 2020
51e4d4a
The method execute() contains an exit expression.
raphaelrejes Nov 18, 2020
1c003d8
Use ===/!== to compare with true/false or Numbers
raphaelrejes Nov 18, 2020
07f4abc
Use ===/!== to compare with true/false or Number
raphaelrejes Nov 18, 2020
6e4f8e7
Add Codacy badge
codacy-badger Nov 19, 2020
d7a41f6
Merge pull request #147 from codacy-badger/codacy-badge
raphaelrejes Nov 19, 2020
02188bc
code style config update
raphaelrejes Nov 19, 2020
d521a95
Merge branch 'master' of https://github.com/pagseguro/pagseguro-modul…
raphaelrejes Nov 19, 2020
7f88497
code style config update
raphaelrejes Nov 19, 2020
a5c48fc
code style config update
raphaelrejes Nov 19, 2020
bcf188f
code style config update
raphaelrejes Nov 19, 2020
72923d6
Update public.js
raphaelrejes Nov 19, 2020
b79afde
Update credit-card.js
raphaelrejes Nov 19, 2020
ee5353a
Update credit-card.js
raphaelrejes Nov 19, 2020
d62636d
Update README.md
raphaelrejes Nov 19, 2020
00c9809
Update public.js
raphaelrejes Nov 19, 2020
ba335ae
Fixed console log
raphaelrejes Nov 19, 2020
9e825c1
Fixed console log
raphaelrejes Nov 19, 2020
d862503
Use ===/!== to compare with true/false or Numbers
raphaelrejes Nov 19, 2020
71c5362
Fix 'Cpf Invalido' on boleto Method and fix credit card payment Js
wmilou Mar 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/relatorio-de-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Relatorio de bug
about: Forneça informações do bug encontrado
---

_Este relatório deve ser usado **APENAS** para reportar bugs_

## Comportamento esperado

<!--- Diga-nos qual deveria ser o comportamento esperado -->

## Comportamento atual

<!--- Diga-nos o que acontece em vez do comportamento esperado -->

## Ambiente (produção, sandbox)

## Passos para reproduzir o bug

<!--- Forneça um link para um exemplo ao vivo ou um conjunto de etapas -->
<!--- reproduzir este bug. Incluir código para reproduzir, se relevante -->

1.
2.
3.
4.

## Descrição Detalhada

<!--- Forneça uma descrição detalhada da alteração ou adição que você está propondo -->

## Possível solução

<!--- Opcional, mas você pode sugerir uma correção/razão para o bug -->
46 changes: 46 additions & 0 deletions .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.

name: Codacy Security Scan

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
codacy-security-scan:
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v2

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/[email protected]
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif
62 changes: 62 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 3 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,27 @@ skin/frontend/default/modern/
skin/frontend/enterprise
skin/install/
var/
#prettierconfgs
/.cache
/node_modules
/scripts/release/node_modules
*.log
/errors
/test*.*
/.vscode
/dist
/website/node_modules
/website/build
/website/i18n
/website/static/playground.js
/website/static/lib
.DS_Store
/coverage
.idea
package-lock.json
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
Binary file added .vs/slnx.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion Block/Product/View/Installments.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ public function getInstallment($value)
*/
public function isEnabled() {
$status = $this->_scopeConfig->getValue('payment/pagseguro/installments');
return (! is_null($status) && $status == 1) ? true : false;
return (! ($status=== null) && $status=== 1) ? true : false;
}
}
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
1.12.0

- Checkout sem endereço (para produtos do tipo 'virtual' e 'downloadable')
- Habilitar/desabilitar recuperação de carrinho do PagSeguro via admin
- Tela de listar transações no admin, permitindo ver detalhes da transação
- Estorno parcial
- Disconto por meio de pagamento via configuração do módulo (admin) para o checkout padrão/lightbox
- Atualizada versão do pagseguro-php-sdk no composer.json para utilizar as versões 4.+
- Adicionada compatibilidade com endereços de 4 linhas, no formato: 1 rua/endereço, 2 número, 3 complemento, 4 bairro (padrão brasileiro)
- Valida se o telefone do comprador foi configurado antes de tentar usar o telefone do endereço de entrega
- Fix: Corrigido id dos itens do pedido (carrinho) enviados para o PagSeguro

1.4.0

- Alterado o fluxo do checkout transparente (na própria tela de checkout do Magento)
- Alterada a forma de configurar o módulo e os meios de pagamento do PagSeguro, que agora são configurados individualmente.
- Melhorias gerais e correções de bugs: transações do admin, css muito abrangente, remoção de arquivos velhos e desnecessários, refatorações.

1.3.0

- Adicionada validação e mensagens de erro (frontend) nos formulários do checkout transparente

1.2.6

- Melhoria na configuração do log na interface administrativa
- Adicionada seção de atualização do módulo e atualização geral da documentação (README.md)
- Correção de bugs quando o pedido deixava de existir ou a sessão era encerrada
- Correçao para aceitar CVV de 4 digitos
- Melhoria no acesso aos dados do endereço do cliente

1.2.1

- Alterada a biblioteca JavaScript utilizada nas máscaras.

1.2.0

- Adicionada opção para utilizar o Checkout Transparente.

1.1.0

- Possibilidade de consultar e solicitar o cancelamento de transações;
- Possibilidade de consultar e solicitar o estorno de transações;
- Possibilidade de definir descontos com base no meio de pagamento escolhido durante o checkout PagSeguro;

1.0.0

- Adicionando opção para utilização do Checkout Lightbox.
- Integração com API de Notificação.
- Integração com API de Pagamento do PagSeguro.
- Configuração do Setup do módulo.
- Adicionado meio de pagamento ao Magento2
- Versão inicial.
3 changes: 1 addition & 2 deletions Controller/Adminhtml/Refund/Refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ public function execute()
$this->_objectManager->create('UOL\PagSeguro\Helper\Library'),
$this->_objectManager->create('UOL\PagSeguro\Helper\Crypt')
);

try {
return $this->whenSuccess($refund->execute($this->getRequest()->getParam('data')));
return $this->whenSuccess($refund->execute($this->getRequest()->getParam('data'), $this->getRequest()->getParam('value')));
} catch (\Exception $exception) {
return $this->whenError($exception->getMessage());
}
Expand Down
73 changes: 73 additions & 0 deletions Controller/Adminhtml/Transactions/Index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?php
/**
* 2007-2016 [PagSeguro Internet Ltda.]
*
* NOTICE OF LICENSE
*
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
*You may obtain a copy of the License at
*
*http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing, software
*distributed under the License is distributed on an "AS IS" BASIS,
*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*See the License for the specific language governing permissions and
*limitations under the License.
*
* @author PagSeguro Internet Ltda.
* @copyright 2016 PagSeguro Internet Ltda.
* @license http://www.apache.org/licenses/LICENSE-2.0
*/

namespace UOL\PagSeguro\Controller\Adminhtml\Transactions;
use UOL\PagSeguro\Controller\Pageable;

/**
* Class Index
* @package UOL\PagSeguro\Controller\Adminhtml
*/
class Index extends Pageable
{

/**
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
parent::__construct($context, $resultPageFactory);
}

/**
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
/** @var \UOL\PagSeguro\Helper\Auth $authHelper */
$authHelper = $this->_objectManager->create('UOL\PagSeguro\Helper\Auth');

/** Check for credentials **/
if (!$authHelper->hasCredentials())
return $this->_redirect('pagseguro/credentials/error');

/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->_resultPageFactory->create();
$resultPage->getConfig()->getTitle()->prepend(__('Listar transações'));
$resultPage->getLayout()->getBlock('adminhtml.block.pagseguro.transactions.content')->setData('adminurl', $this->getAdminUrl());
return $resultPage;
}

/**
* Cancellation access rights checking
*
* @return bool
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('UOL_PagSeguro::Transactions');
}
}
Loading