Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lançamento da versão inicial. #67

Merged
merged 255 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
7134b76
feat: estrutura para criação de Plano na vindi
mBalao9 Mar 11, 2020
5d0b8d8
feat(vindihelpers.php): fN para adição de atributos customizados no WC
mBalao9 Mar 12, 2020
641e46f
feat(routes.php): rota para criação de planos
mBalao9 Mar 12, 2020
6f1e2ed
feat(planscontroller.php): criando produto e plano na vindi
mBalao9 Mar 12, 2020
91165d7
feat(customercontroller.php): criação de cliente na vindi
mBalao9 Mar 13, 2020
aa97dc0
feat(customercontroller.php): atualizando informações de usuário na API
mBalao9 Mar 13, 2020
e2a750f
Merge pull request #6 from mentores-digital/feature/testCreateProduct
MatheusKindrazki Mar 13, 2020
34f4b16
Update README.md
MatheusKindrazki Mar 13, 2020
2eb5272
fix: alterando .env
thihxm Mar 13, 2020
60d2c8d
Merge pull request #7 from mentores-digital/thihxm-patch-1
MatheusKindrazki Mar 13, 2020
3118b89
Delete .env.php
MatheusKindrazki Mar 13, 2020
828c3bb
Validação do token + mensagem de erro token inválido
thihxm Mar 16, 2020
b3044e3
Merge pull request #8 from mentores-digital/feature/validation
MatheusKindrazki Mar 17, 2020
53e4a49
feat: ciclo do cupom
thihxm Mar 17, 2020
7cf0927
Merge branch 'develop' of github.com:mentores-digital/vindi-plugin in…
thihxm Mar 18, 2020
21aba6e
Máscara de cartão de crédito
thihxm Mar 18, 2020
a07528d
feat(bankslippayment.php): criação do Gateway de Boleto
thihxm Mar 18, 2020
279ee33
Merge pull request #12 from mentores-digital/feature/gateway-boleto
MatheusKindrazki Mar 23, 2020
fec1bce
fechar notificação de token inválido
thihxm Apr 7, 2020
15ed3e0
Revert "fechar notificação de token inválido"
thihxm Apr 7, 2020
ff711cf
fechar notificação de token inválido
thihxm Apr 7, 2020
0bb41e2
mostrar notificação token invalido ao entrar
thihxm Apr 7, 2020
c187732
Revert "mostrar notificação token invalido ao entrar"
thihxm Apr 7, 2020
fe90458
mostrar notificação token invalido ao entrar
thihxm Apr 7, 2020
9fd9e03
fechar notificação de token inválido
thihxm Apr 7, 2020
415723f
Merge branch 'feature/fechar-aviso-token-invalido' into develop
thihxm Apr 8, 2020
430f801
correção na checagem da api key
thihxm Apr 8, 2020
0116a48
criação de templates para os métodos de pagamento
thihxm Apr 8, 2020
4e50479
troca da mascara de cartão
thihxm Apr 8, 2020
ed6ef74
Merge branch 'feature/templates-checkout-cc-e-boleto' into develop
thihxm Apr 8, 2020
f5de3e7
correção no update de usuário na vindi
thihxm Apr 9, 2020
dc67c7e
fix: alterando configurações de bootstrap
MatheusKindrazki Apr 13, 2020
0aefaaa
Merge pull request #14 from mentores-digital/feature/fechar-aviso-tok…
MatheusKindrazki Apr 13, 2020
56165bf
feat: corrigindo erros de execução do teste
MatheusKindrazki Apr 13, 2020
b110bca
fix(bootstrap.php): correção de execução de testes
MatheusKindrazki Apr 13, 2020
e160e4c
fix(tests/phpunit/vindi/base/test-initial-subscription.php): add Setting
MatheusKindrazki Apr 13, 2020
b721d74
fix(teste-initial-subscription.php): adicionando Settings
MatheusKindrazki Apr 13, 2020
6bc3165
Merge branch 'develop' into feature/templates-checkout-cc-e-boleto
MatheusKindrazki Apr 13, 2020
5c77519
Merge pull request #16 from mentores-digital/feature/templates-checko…
MatheusKindrazki Apr 13, 2020
0bee245
feat: corrigindo erros de execução do teste
MatheusKindrazki Apr 13, 2020
f6b68e2
fix: alterando configurações de bootstrap
MatheusKindrazki Apr 13, 2020
5363032
fix(tests/phpunit/vindi/base/test-initial-subscription.php): add Setting
MatheusKindrazki Apr 13, 2020
ff0987e
fix(teste-initial-subscription.php): adicionando Settings
MatheusKindrazki Apr 13, 2020
92329f4
Merge branch 'feature/correcao-update-usuario' into develop
thihxm Apr 15, 2020
91eb9e2
refactor(couponsmetabox.php): simplificação na inserção de campos novos
thihxm Apr 15, 2020
52a6c8d
fix: correção das configurações triplicadas
thihxm Apr 15, 2020
f8d8cbd
refactor(planscontroller.php): troca do modo de verificar novo produto
thihxm Apr 15, 2020
1b82e37
feat: ativar/desativar plano e produto na vindi
thihxm Apr 15, 2020
2776835
style: $vindiSettings -> $vindi_settings
thihxm Apr 15, 2020
00daa54
feat: remoção de usuário
thihxm Apr 15, 2020
8b3112b
Merge branch 'feature/remover-produto-usuario-plano' into develop
thihxm Apr 15, 2020
85d2a05
fix(planscontroller.php): correção na verificação dos id's da vidi
thihxm Apr 16, 2020
a592b9b
Merge branch 'feature/remover-produto-usuario-plano' into develop
thihxm Apr 16, 2020
c5a9043
feat(couponsmetabox.php): remoção das opções do WC de cupom recorrente
thihxm Apr 16, 2020
1ce4457
Merge pull request #19 from mentores-digital/feature/remover-produto-…
MatheusKindrazki Apr 16, 2020
cf6f9ce
fix: padronização das variáveis
MatheusKindrazki Apr 16, 2020
ea99a63
feat(conversions.php): adicionando conversos de dia mes e ano
MatheusKindrazki Apr 17, 2020
1d36691
refactor: criação de um produto variável com efeito na vindi
MatheusKindrazki Apr 18, 2020
2d1fca0
fix(./test/test-vindi.php): ajustando variável de Testes
MatheusKindrazki Apr 18, 2020
8b3fc4c
feat(routesapi.php): tratamento retornos + rotas checkout
thihxm Apr 20, 2020
d37e4bb
refactor: remoção do desetruturamento do retorno da comunicação api
thihxm Apr 20, 2020
48231ac
feat(paymentprocessor.php): implementação do processador de pagamentos
thihxm Apr 20, 2020
786de81
feat(paymentgateway.php): centralização funções do gateway de pagamento
thihxm Apr 20, 2020
0001931
feat: limpeza dos gateways de pagamento
thihxm Apr 20, 2020
7a7b423
fix(test-initial-subscription.php): correção no teste principal
thihxm Apr 20, 2020
0b69f75
Merge branch 'feature/processar-pagamento' into develop
thihxm Apr 20, 2020
934a927
fix(settings.php): troca da ordem de execução da action de salvamento
thihxm Apr 20, 2020
8840bb8
feat: update de Produto e Plano dentro da VIndi
MatheusKindrazki Apr 20, 2020
38ed19a
Merge pull request #21 from mentores-digital/feature/correcao-salvame…
MatheusKindrazki Apr 20, 2020
790c228
Merge branch 'develop' into feature/update-plan-and-product
MatheusKindrazki Apr 20, 2020
7364575
refactor: remoção das desestruturações desnecessárias
thihxm Apr 20, 2020
231c5ba
Merge pull request #23 from mentores-digital/feature/update-plan-and-…
thihxm Apr 20, 2020
a6830fa
feat(paymentprocessor.php): criação do usuário se ele não existe
thihxm Apr 20, 2020
4abc452
feat(bankslip-download.html.php): template de download do boleto
thihxm Apr 23, 2020
fe1cdda
feat(bankslippayment.php): adição do download do boleto dentro da order
thihxm Apr 23, 2020
c963ae2
fix(bankslippayment.php): checagem se a order não foi cancelada
thihxm Apr 23, 2020
e87bbe5
refactor(settings.php): eliminar a necessidade de instanciar VindiRoutes
thihxm Apr 23, 2020
521ac2e
refactor(settings.php): instânciando a variavel $routes
thihxm Apr 23, 2020
d404277
feat(admin-settings.html.php): novas mensagens nas configurações
thihxm Apr 23, 2020
814d9d5
feat(webhooks.php): adição do suporte aos webhooks Vindi
thihxm Apr 23, 2020
b632932
feat(webhooks.php): adição dos webhooks
thihxm Apr 23, 2020
5f4ee1d
fix: upgrade dos pacotes node
thihxm Apr 23, 2020
55fab01
fix(creditpayment.php): inicialização das variáveis das opções
thihxm Apr 23, 2020
f7244c0
Merge pull request #27 from mentores-digital/feature/inicializacao-va…
MatheusKindrazki Apr 24, 2020
d9cc4bb
feat: habilitar opções de nfe
thihxm Apr 24, 2020
031cec7
refactor(creditpayment.php): remoção do handler local de pagamento
thihxm Apr 27, 2020
5400d2a
feat(paymentgateway.php): habilitando o reembolso automático da vindi
thihxm Apr 27, 2020
b4097d8
feat(subscriptionstatushandler.php): cancelar assinatura ao estornar
thihxm Apr 27, 2020
1a74439
Merge branch 'feature/reembolso' into develop
thihxm Apr 27, 2020
37b1253
feat(routesapi.php): checagem se o produto existe antes de enviar
thihxm Apr 27, 2020
ae5a9bc
feat(productcontroller.php): criação de produto simples
thihxm Apr 27, 2020
a069dba
refactor: alterando o instanciamento dos gateways
thihxm Apr 28, 2020
12224c0
style: espaços em branco + nome errado da variável (fora do padrão)
thihxm Apr 28, 2020
46fb39a
feat(paymentprocessor.php): criação do produto dentro da vindi
thihxm Apr 28, 2020
faea372
refactor: alteração no modo de busca da meta_data
thihxm Apr 28, 2020
0b79bd3
style(paymentgateway.php): reembolso -> Transação
thihxm Apr 28, 2020
e1edd46
fix(test-initial-subscription.php): erro na inicialização do gateway
thihxm Apr 28, 2020
5176550
Merge branch 'feature/criar-produto-simples' into develop
thihxm Apr 28, 2020
45788f0
style: post metas renomeados
thihxm Apr 29, 2020
88f0d71
feat(paymentprocessor.php): compra de multiplas assinaturas
thihxm Apr 29, 2020
103f263
refactor: algumas correções mínimas
thihxm Apr 30, 2020
6d7d85d
Merge pull request #28 from mentores-digital/feature/enviar-nfe
MatheusKindrazki May 4, 2020
94f3ee1
Merge pull request #29 from mentores-digital/feature/reembolso
MatheusKindrazki May 4, 2020
5761dae
Merge pull request #30 from mentores-digital/feature/criar-produto-si…
MatheusKindrazki May 4, 2020
9976bd3
feat(productstatus.php): notificação de produto criado/atualizado
thihxm May 4, 2020
62f53a9
feat: tradução das mensagens
thihxm May 4, 2020
b8c0d14
refactor(paymentprocessor.php): reestruturação processador de pagamentos
thihxm May 5, 2020
b386c4a
fix(planscontroller.php): error ao cirar plano sem data de expiralção
thihxm May 6, 2020
e9ad932
feat(paymentprocessor.php): envio dos produtos simples como uma fatura
thihxm May 11, 2020
7bbda37
feat: adicionar taxa separadamente + webhooks com post_meta novo
thihxm May 12, 2020
4a6883a
feat: tradução mensagens do cupom + limitação no desconto carrinho fixo
thihxm May 13, 2020
3b3def8
feat(paymentprocessor.php): descontos aplicados separadamente
thihxm May 13, 2020
6b86254
docs(paymentprocessor.php): descrição das funções
thihxm May 13, 2020
8b61fdc
feat(paymentprocessor.php): cancelar todas as assinaturas se der erro
thihxm May 13, 2020
4ea8e3e
feat(paymentprocessor.php): adição do nome do produto no post_meta
thihxm May 13, 2020
65302c6
feat(bankslippayment.php): mostrar todos os boletos
thihxm May 13, 2020
8628934
refactor(bankslip-download.html.php): remoção do $key no for
thihxm May 13, 2020
5fe0a6f
feat: inicio da troca do método de verificar dependencias
thihxm May 14, 2020
cf497f2
feat: algumas verificações de dependencia
thihxm May 14, 2020
5954239
feat(paymentprocessor.php): multiplos boletos
thihxm May 14, 2020
3f01d15
Merge branch 'feature/comprar-multiplas-assinaturas' into develop
thihxm May 14, 2020
39cb8cb
Merge branch 'feature/comprar-multiplas-assinaturas' into develop
thihxm May 14, 2020
bef90ad
Merge pull request #31 from mentores-digital/feature/comprar-multipla…
MatheusKindrazki May 14, 2020
d150b6f
feat(webhooks.php): webhook bill_paid corrigido
thihxm May 14, 2020
b5d166f
fix(paymentprocessor.php): alterado modo de checagem de todas as faturas
thihxm May 14, 2020
8f8d28b
Merge branch 'feature/webhook-bill-paid' into develop
thihxm May 14, 2020
2ad0b99
refactor(bankslip-download.html.php): nova verificação do bill status
thihxm May 15, 2020
590eb36
feat: cancelamento de fatura espelhanda na vindi ou no woocommerce
thihxm May 15, 2020
101336b
Merge branch 'feature/webhook-bill-canceled' into develop
thihxm May 15, 2020
6bbf0e0
refactor: remoção de log desnecessário
thihxm May 15, 2020
1fd16c5
Merge branch 'feature/webhook-bill-canceled' into develop
thihxm May 15, 2020
2d557a3
fix(customercontroller.php): troca para operador ternário
thihxm May 15, 2020
c1bdb50
feat(dependencies.php): novo verificador de dependências
thihxm May 18, 2020
fd3a787
refactor(dependencies.php): maneira correta de adicionar o alerta
thihxm May 18, 2020
36b50c0
Merge branch 'feature/dependencias' into develop
thihxm May 18, 2020
7f0f223
refactor: remoção de views desnecessárias
thihxm May 18, 2020
55eb722
Merge branch 'feature/dependencias' into develop
thihxm May 18, 2020
c497341
fix: melhoria na responsividade a erros da api key
thihxm May 18, 2020
7eda61e
refactor(settings.php): variável invalidToken renomeada
thihxm May 18, 2020
aaadff9
Merge branch 'feature/correcao-configuracoes' into develop
thihxm May 18, 2020
b7009fe
Merge pull request #36 from mentores-digital/feature/correcao-configu…
MatheusKindrazki May 18, 2020
5bb5d6f
fix: validando existência do .env
May 19, 2020
eb3d427
fix: checagem se o post é um rascunho
thihxm May 19, 2020
c5e0f34
fix(paymentprocessor.php): habilitar o pagamento de produtos simples
thihxm May 19, 2020
28e9029
Merge pull request #37 from mentores-digital/feature/bug-criacao-produto
MatheusKindrazki May 19, 2020
1214d06
Merge pull request #38 from mentores-digital/feature/processamento-se…
MatheusKindrazki May 19, 2020
1b681b6
feat(paymentprocessor.php): adição do frete somente em 1 produto
thihxm May 19, 2020
1a5c856
Merge pull request #39 from mentores-digital/feature/frete
MatheusKindrazki May 19, 2020
e225625
feat(paymentprocessor.php): bloqueio compra de produtos simples e trials
thihxm May 20, 2020
b5191fc
refactor(paymentprocessor.php): verificar pedido antes de buscar cliente
thihxm May 20, 2020
1d7c939
Merge branch 'feature/frete-correcao' into develop
thihxm May 20, 2020
ebb1b2f
fix(paymentprocessor.php): busca do item equivalente ao item do trial
thihxm May 20, 2020
7c3cdfa
Merge pull request #40 from mentores-digital/feature/frete-correcao
MatheusKindrazki May 20, 2020
0ef5046
Merge pull request #41 from mentores-digital/feature/bug-assinatura-c…
MatheusKindrazki May 20, 2020
24d30a0
Merge branch 'develop' into feature/ajustes-de-bugs
MatheusKindrazki May 21, 2020
43e6608
feat: tratativa renovação pedido
thihxm May 21, 2020
36f3dd6
fix(paymentgateway.php): correção do reembolso
thihxm May 21, 2020
e452f57
Merge branch 'feature/novo-reembolso' into develop
thihxm May 21, 2020
0c9e8af
Merge pull request #42 from mentores-digital/feature/novo-reembolso
MatheusKindrazki May 22, 2020
95d9677
refactor(paymentprocessor.php): dando update das informações do usuário
MatheusKindrazki May 22, 2020
125cca8
fix(teste-api.php): removendo teste de criação de usuário
MatheusKindrazki May 22, 2020
c2e9441
refactor(productstatus.php): remocao do comentario
thihxm May 22, 2020
4dc15f3
fix(routesapi.php): rota errada
thihxm May 22, 2020
b9bf604
fix(planscontroller.php): correcao dos envio de planos
thihxm May 22, 2020
34e6730
feat: adicao de juros
thihxm May 22, 2020
abec780
Merge pull request #44 from mentores-digital/feature/ajustes-de-bugs
MatheusKindrazki May 22, 2020
91aabf2
feat: enviar juros somente se houver parcelamento
thihxm May 22, 2020
deb83af
Merge pull request #43 from mentores-digital/feature/converter-produt…
MatheusKindrazki May 22, 2020
563b8f5
feat: juros adicionados na compra
thihxm May 25, 2020
fc08611
Merge branch 'develop' into feature/juros
thihxm May 26, 2020
aa784ef
Merge pull request #45 from mentores-digital/feature/juros
thihxm May 26, 2020
2dae372
feat(paymentprocessor.php): cancelamento de faturas caso erro no pedido
thihxm May 26, 2020
5d41d59
fix(productcontroller.php): remoção da checagem se produto é assinatura
thihxm May 26, 2020
5a6a4b1
Merge pull request #46 from mentores-digital/feature/cancelar-fatura-…
MatheusKindrazki May 26, 2020
e16b0b6
Merge pull request #47 from mentores-digital/feature/bug-atualizacao-…
MatheusKindrazki May 26, 2020
a005c57
feat: somente um campo de api
thihxm May 28, 2020
64848ec
refactor(settings.php): retorno do check sandbox para posição anterior
thihxm Jun 2, 2020
a75c9d5
refactor(settings.php): remoção de comentário com código exemplo
thihxm Jun 3, 2020
2221d4a
fix(customercontroller.php): correção do envio de informações sem valor
thihxm Jun 3, 2020
879ac53
Merge branch 'feature/correcoes-reuniao' into develop
thihxm Jun 3, 2020
fed929b
fix(routesapi.php): adicionado suporte a boletos webservice
thihxm Jun 3, 2020
caa89a9
Merge pull request #50 from mentores-digital/feature/correcoes-reuniao
MatheusKindrazki Jun 5, 2020
27e2b59
Merge pull request #51 from mentores-digital/feature/validacao-boletos
MatheusKindrazki Jun 5, 2020
3c5473a
feat(admin-settings.html.php): cSS Alerta
welltrojan Jun 5, 2020
b94d7a9
refactor(dependencies.php): separação dos arquivos de dependencias
thihxm Jun 5, 2020
4ad54d4
feat(product-status.php): alertas style
welltrojan Jun 5, 2020
f5733e8
feat(dependencies.php): adicionar todos os erros
thihxm Jun 5, 2020
94f6004
Merge pull request #53 from mentores-digital/feature/views-dependencias
welltrojan Jun 5, 2020
88e9a19
Merge branch 'feature/views-dependencias' into develop
thihxm Jun 5, 2020
7cf0dd3
feat: gitignore
welltrojan Jun 5, 2020
2181ee0
feat: merge
welltrojan Jun 5, 2020
f258472
feat(missing-dependency.php): alertas
welltrojan Jun 5, 2020
ddff64b
feat: cartão CSS
welltrojan Jun 8, 2020
fc264f2
Merge pull request #52 from mentores-digital/feature/estilizacao
thihxm Jun 8, 2020
0e9d278
fix(interestpricehandler.php): remoção de juros no pagamento por boleto
thihxm Jun 8, 2020
9ccec59
feat: troca para juros simples
thihxm Jun 8, 2020
526c1da
Merge pull request #57 from mentores-digital/feature/correcao-juros
welltrojan Jun 8, 2020
c35da0c
Merge branch 'feature/correcao-juros' into develop
thihxm Jun 8, 2020
11262a4
test(test-dependencies.php): teste de dependências criticas
thihxm Jun 9, 2020
8527518
test: correção da ordem dos hooks + ativar somente arquivos necessários
thihxm Jun 9, 2020
d643cb0
test(dependencies.php): desabilitar verificação de versões se for teste
thihxm Jun 9, 2020
922bf52
fix: correção de loop infinito se produto/plano nao fosse criado
thihxm Jun 10, 2020
397a1f7
Ajusta nome da Vindi
laerte-guimaraes Jun 10, 2020
16fa216
Ajusta validação de certificado SSL por tipo de ambiente
laerte-guimaraes Jun 10, 2020
ff4fe8e
Remove constante desnecessária
laerte-guimaraes Jun 10, 2020
d38dd70
Ajusta URL de retorno para webhooks Vindi
laerte-guimaraes Jun 10, 2020
cbce218
Altera exposição do método para dinâmico
laerte-guimaraes Jun 10, 2020
7a9574e
Merge pull request #1 from laerte-guimaraes/develop
laerte-guimaraes Jun 10, 2020
cddf938
Corrige mensagem sobre o plugin na tela de configurações
laerte-guimaraes Jun 10, 2020
073ed9e
fix: correção de loop infinito se produto/plano nao fosse criado
thihxm Jun 10, 2020
6dc0cbe
test(test-gateways.php): testar tipo dos gateways de pagamento
thihxm Jun 10, 2020
317a4a1
test(test-payment-processor.php): teste de dados
thihxm Jun 10, 2020
859b10c
test(test-payment-processor.php): teste comentado
thihxm Jun 10, 2020
a3be93c
refactor: remoção do post_meta 'vindi_product_created'
thihxm Jun 16, 2020
1396f90
refactor: remoção do post_meta 'vindi_product_created'
thihxm Jun 16, 2020
96228c8
test(test-product.php): testes de produto
thihxm Jun 16, 2020
6c0986a
refactor(customercontroller.php): utilização dos getters dos metas
thihxm Jun 17, 2020
014f154
test(test-customer.php): testes de usuário
thihxm Jun 17, 2020
a334902
refactor(customercontroller.php): buscar por um resgistro do user_meta
thihxm Jun 18, 2020
042c324
refactor(paymentprocessor.php): buscar id do produto utilizando o getter
thihxm Jun 18, 2020
e04ea33
refactor(test-customer.php): centralização do update meta do usuário
thihxm Jun 18, 2020
4d0b1ec
test(test-payment-processor.php): teste do processador de pagamentos
thihxm Jun 18, 2020
f050b61
Merge branch 'feature/tests' into develop
thihxm Jun 18, 2020
5b4188e
feat(admin-settings.html.php): cSS Alerta
welltrojan Jun 5, 2020
d5d42d9
feat(product-status.php): alertas style
welltrojan Jun 5, 2020
80e445a
feat: gitignore
welltrojan Jun 5, 2020
d035db3
feat(missing-dependency.php): alertas
welltrojan Jun 5, 2020
de96665
feat: cartão CSS
welltrojan Jun 8, 2020
69a6d88
Merge pull request #58 from mentores-digital/feature/bug-criacao-produto
MatheusKindrazki Jun 18, 2020
214b5a3
Merge pull request #59 from laerte-guimaraes/patch-1
MatheusKindrazki Jun 18, 2020
7ca0f2d
Merge pull request #60 from laerte-guimaraes/develop
MatheusKindrazki Jun 18, 2020
8673624
refactor(admin.sass): ícones renomeados
thihxm Jun 18, 2020
7b6ed9d
Merge pull request #61 from laerte-guimaraes/fix/webhook_url
MatheusKindrazki Jun 18, 2020
7b035f4
Merge pull request #62 from laerte-guimaraes/patch-2
MatheusKindrazki Jun 18, 2020
0635e5a
feat(creditcard-checkout.html.php): estilização do input de cartão
thihxm Jun 19, 2020
877947e
feat(bankslip-download.html.php): estilização da lista de boletos
thihxm Jun 19, 2020
9105aee
refactor: remoção do config.codekit3
thihxm Jun 19, 2020
6bfa3e2
feat(routesapi.php): utilizar último cartão cadastrado
thihxm Jun 19, 2020
3b0f608
Merge branch 'develop' into feature/estilizacao-frontend
thihxm Jun 19, 2020
457342b
Merge pull request #63 from mentores-digital/feature/estilizacao-fron…
MatheusKindrazki Jun 19, 2020
9cd9baa
docs(changelog.md): adição do changelog da versão 1.0.0
thihxm Jun 22, 2020
21a80bf
feat(vindi-woocommerce.pot): arquivo de tradução gerado
thihxm Jun 22, 2020
4774174
feat: merge
thihxm Jun 22, 2020
86edf95
docs(changelog.md): juros no parcelamento
thihxm Jun 22, 2020
b61dc59
Merge pull request #64 from mentores-digital/feature/changelog
MatheusKindrazki Jun 22, 2020
d252d10
Merge branch 'feature/changelog' into develop
thihxm Jun 22, 2020
0783997
feat: banner + nome para publicar
thihxm Jun 22, 2020
8b8100c
Merge pull request #65 from mentores-digital/feature/banner
MatheusKindrazki Jun 22, 2020
0a49695
feat(readme.txt): readme para o worpress.org
thihxm Jun 22, 2020
757db32
Merge pull request #66 from mentores-digital/feature/licenca-wordpres…
MatheusKindrazki Jun 22, 2020
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
5 changes: 1 addition & 4 deletions src/VindiWoocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct()
/**
* Add Gateway to Woocommerce
*/
add_filter('woocommerce_payment_gateways', 'add_gateway');
add_filter('woocommerce_payment_gateways', array($this->settings, 'add_gateway'));
} else {

add_action('admin_notices', 'dependencies_notices');
Expand All @@ -51,9 +51,6 @@ public function __construct()
*/
public function init()
{
// Loading Methods in the WC
require_once $this->getPath() . '/utils/WcAddGateway.php';

// Helpers and Languages
require_once $this->getPath() . '/services/Api.php';
require_once $this->getPath() . '/services/Logger.php';
Expand Down
35 changes: 13 additions & 22 deletions src/assets/js/frontend.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
/* global wcbcf_public_params */
jQuery(function($) {
const vindi_plugin = {
init: function() {
/* woocommerce-extra-checkout-fields-for-brazil input mask toggle value
if (wcbcf_public_params.maskedinput === "yes")
*/
vindi_plugin.maskCC();
},
maskCC: function() {
$("#misha_ccNo").mask("0000 0000 0000 0000");
$("#misha_expdate").mask("00/00");
$("#misha_cvv").mask("000");
},
unmaskCC: function() {
$("#misha_ccNo").unmask();
$("#misha_expdate").unmask();
$("#misha_cvv").unmask();
}
};

vindi_plugin.init();
});
(function ($) {
"use strict";
$(function () {
$("#vindi_ccNo").payment("formatCardNumber");
$("#vindi_expdate").payment("formatCardExpiry");
$("#vindi_cvv").payment("formatCardCVC");
$("body").on("updated_checkout", function () {
$("#vindi_ccNo").payment("formatCardNumber");
$("#vindi_expdate").payment("formatCardExpiry");
$("#vindi_cvv").payment("formatCardCVC");
});
});
})(jQuery);
2 changes: 1 addition & 1 deletion src/includes/FrontendFilesLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function __construct() {

public static function registerFiles()
{
wp_register_script( 'vindi_woocommerce_frontend_js', plugins_url( '/assets/js/frontend.js', plugin_dir_path( __FILE__ ) ), array( 'jquery', 'jquery-mask' ), VINDI_VERSION, true );
wp_register_script( 'vindi_woocommerce_frontend_js', plugins_url( '/assets/js/frontend.js', plugin_dir_path( __FILE__ ) ), array( 'jquery', 'jquery-payment' ), VINDI_VERSION, true );
wp_enqueue_script ( 'vindi_woocommerce_frontend_js' );
}
}
23 changes: 22 additions & 1 deletion src/includes/admin/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,39 @@ public function api_key_field()
if (!$api_key) {
return;
}
if ('unauthorized' == $this->api->test_api_key($api_key)) {
if ('unauthorized' === $this->api->test_api_key($api_key)) {
update_option('vindi_invalid_token', true);
$this->invalidToken = true;

include_once VINDI_SRC . 'views/invalid-token.php';
} else {
update_option('vindi_invalid_token', false);
$this->invalidToken = false;
}
}

/**
* Check if invalidToken is true
* @return mixed includes the invalid-token view
*/
public function is_api_key_valid()
{
if($this->invalidToken) {
include_once VINDI_SRC . 'views/invalid-token.php';
}
}

/**
* Add the gateway to WooCommerce.
* @param array $methods WooCommerce payment methods.
* @return array Payment methods with Vindi.
*/
public function add_gateway($methods)
{

$methods[] = new VindiCreditGateway($this);
$methods[] = new VindiBankSlipGateway($this);

return $methods;
}
}
36 changes: 7 additions & 29 deletions src/includes/gateways/BankSlipPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@

class VindiBankSlipGateway extends VindiPaymentGateway
{

/**
* Constructor for the gateway.
*/

public function __construct()
public function __construct(VindiSettings $vindiSettings)
{

global $woocommerce;

$this->vindiSettings = $vindiSettings;

$this->id = 'vindi-bank-slip';
$this->icon = apply_filters('vindi_woocommerce_bank_slip_icon', '');
$this->method_title = __('Vindi - Bank slip', 'vindi-woocommerce');
Expand Down Expand Up @@ -156,33 +157,10 @@ public function payment_scripts()

public function payment_fields()
{

// ok, let's display some description before the payment form
if ($this->description) {
// you can instructions for test mode, I mean test card numbers etc.
if ($this->testmode) {
$this->description .= ' TEST MODE ENABLED. In test mode, you can use the bank slip listed in <a href="#" target="_blank" rel="noopener noreferrer">documentation</a>.';
$this->description = trim($this->description);
}
// display the description with <p> tags etc.
echo wpautop(wp_kses_post($this->description));
}

// I will echo() the form, but you can close PHP tags and print it directly in HTML
echo '<fieldset id="wc-' . esc_attr($this->id) . '-cc-form" class="wc-bank-slip-form wc-payment-form" style="background:transparent;">';

// Add this action hook if you want your custom payment gateway to support it
do_action('woocommerce_bank_slip_form_start', $this->id);

// I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc
echo '<div class="form-row form-row-wide">' .
_e('Um Boleto Bancário será enviado para o seu endereço de e-mail.', VINDI) .
'</div>
<div class="clear"></div>';

do_action('woocommerce_bank_slip_form_end', $this->id);

echo '<div class="clear"></div></fieldset>';
$id = $this->id;
$description = $this->description;
$testmode = $this->testmode;
$this->vindiSettings->get_template('bankslip-checkout.html.php', compact('id', 'description', 'testmode'));
}


Expand Down
43 changes: 7 additions & 36 deletions src/includes/gateways/CreditPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ class VindiCreditGateway extends VindiPaymentGateway
* Constructor for the gateway.
*/

public function __construct()
public function __construct(VindiSettings $vindiSettings)
{

global $woocommerce;

$this->vindiSettings = $vindiSettings;

$this->id = 'vindi-credit-card';
$this->icon = apply_filters('vindi_woocommerce_credit_card_icon', '');
$this->method_title = __('Vindi - Credit card', 'vindi-woocommerce');
Expand Down Expand Up @@ -156,41 +158,10 @@ public function payment_scripts()

public function payment_fields()
{

// ok, let's display some description before the payment form
if ($this->description) {
// you can instructions for test mode, I mean test card numbers etc.
if ($this->testmode) {
$this->description .= ' TEST MODE ENABLED. In test mode, you can use the card numbers listed in <a href="#" target="_blank" rel="noopener noreferrer">documentation</a>.';
$this->description = trim($this->description);
}
// display the description with <p> tags etc.
echo wpautop(wp_kses_post($this->description));
}

// I will echo() the form, but you can close PHP tags and print it directly in HTML
echo '<fieldset id="wc-' . esc_attr($this->id) . '-cc-form" class="wc-credit-card-form wc-payment-form" style="background:transparent;">';

// Add this action hook if you want your custom payment gateway to support it
do_action('woocommerce_credit_card_form_start', $this->id);

// I recommend to use inique IDs, because other gateways could already use #ccNo, #expdate, #cvc
echo '<div class="form-row form-row-wide"><label>Card Number <span class="required">*</span></label>
<input id="misha_ccNo" type="text" autocomplete="off">
</div>
<div class="form-row form-row-first">
<label>Expiry Date <span class="required">*</span></label>
<input id="misha_expdate" type="text" autocomplete="off" placeholder="MM / YY">
</div>
<div class="form-row form-row-last">
<label>Card Code (CVC) <span class="required">*</span></label>
<input id="misha_cvv" type="password" autocomplete="off" placeholder="CVC">
</div>
<div class="clear"></div>';

do_action('woocommerce_credit_card_form_end', $this->id);

echo '<div class="clear"></div></fieldset>';
$id = $this->id;
$description = $this->description;
$testmode = $this->testmode;
$this->vindiSettings->get_template('creditcard-checkout.html.php', compact('id', 'description', 'testmode'));
}


Expand Down
23 changes: 23 additions & 0 deletions src/templates/bankslip-checkout.html.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php if (!defined('ABSPATH')) exit; ?>

<?php if ($testmode): ?>
<p>TEST MODE ENABLED. In test mode, you can use the card numbers listed in <a href="#" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<?php endif; ?>
<?php if ($description): ?>
<p><?php echo $description; ?></p>
<?php endif; ?>

<fieldset id="wc-<?php echo $id; ?>-form" class="wc-bankslip-form wc-payment-form" style="background:transparent;">

<?php do_action('woocommerce_bank_slip_form_start', $id); ?>

<div class="form-row form-row-wide">
<?php _e('A Bank Slip wil be sent to your e-mail.', VINDI); ?>
<?php //_e('Um Boleto Bancário será enviado para o seu endereço de e-mail.', VINDI); ?>
</div>
<div class="clear"></div>

<?php do_action('woocommerce_bank_slip_form_end', $id); ?>

<div class="clear"></div>
</fieldset>
31 changes: 31 additions & 0 deletions src/templates/creditcard-checkout.html.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php if (!defined('ABSPATH')) exit; ?>

<?php if ($testmode): ?>
<p>TEST MODE ENABLED. In test mode, you can use the card numbers listed in <a href="#" target="_blank" rel="noopener noreferrer">documentation</a>.</p>
<?php endif; ?>
<?php if ($description): ?>
<p><?php echo $description; ?></p>
<?php endif; ?>

<fieldset id="wc-<?php echo $id; ?>-form" class="wc-credit-card-form wc-payment-form" style="background:transparent;">

<?php do_action('woocommerce_credit_card_form_start', $id); ?>

<div class="form-row form-row-wide">
<label><?php _e('Card Number', VINDI); ?> <span class="required">*</span></label>
<input id="vindi_ccNo" type="text" autocomplete="off">
</div>
<div class="form-row form-row-first">
<label><?php _e('Expiry Date', VINDI); ?> <span class="required">*</span></label>
<input id="vindi_expdate" type="text" autocomplete="off" placeholder="MM / YY">
</div>
<div class="form-row form-row-last">
<label><?php _e('Card Code (CVC)', VINDI); ?> <span class="required">*</span></label>
<input id="vindi_cvv" type="password" autocomplete="off" placeholder="CVC">
</div>
<div class="clear"></div>

<?php do_action('woocommerce_credit_card_form_end', $id); ?>

<div class="clear"></div>
</fieldset>
18 changes: 0 additions & 18 deletions src/utils/WcAddGateway.php

This file was deleted.

16 changes: 11 additions & 5 deletions tests/phpunit/vindi/base/test-initial-subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
require_once VINDI_PATH . 'src/utils/PaymentGateway.php';
include_once VINDI_PATH . 'src/includes/gateways/CreditPayment.php';

include_once VINDI_PATH . 'src/includes/admin/Settings.php';

/**
* These tests assert various things about processing an initial payment
* for a WooCommerce Subscriptions.
*
* The responses from HTTP requests are mocked using the WP filter
Expand Down Expand Up @@ -42,8 +43,7 @@ function test_data_for_mutli_item_order()
$product_2->save();

// Arrange: Set up an order with:
// 1) A variation product.
// 2) The same product added several times.
// 1) A variation product. // 2) The same product added several times.
// 3) A valid BR ZIP code
$order = new WC_Order();

Expand All @@ -55,7 +55,10 @@ function test_data_for_mutli_item_order()
$order->calculate_totals();

// Act: Call get_level3_data_from_order().
$gateway = new VindiCreditGateway();

$settings = new VindiSettings();

$gateway = new VindiCreditGateway($settings);
$result = $gateway->get_level3_data_from_order($order);


Expand Down Expand Up @@ -128,7 +131,10 @@ public function test_non_us_shipping_zip_codes()

// Act: Call get_level3_data_from_order().
$store_postcode = '1100';
$gateway = new VindiCreditGateway();

$settings = new VindiSettings();

$gateway = new VindiCreditGateway($settings);
$result = $gateway->get_level3_data_from_order($order);

// Assert.
Expand Down