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

Rejeição do pagamento na criação de assinaturas #69

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
b19af91
#11177 Iniciado criação do meio de pagamento por cartão de crédito
Jul 19, 2018
63e2bae
#11177 adicionado estrutura base
Jul 24, 2018
287ec2a
Merge remote-tracking branch 'origin/11177/estrutura-basica' into 111…
Jul 24, 2018
b157a82
#11177 adicionada estrutura base
Jul 24, 2018
af3269e
resolvido conflitos
Jul 24, 2018
4c6f977
#11177 removido arquivos não necessários para esta release
Jul 24, 2018
2928a73
Merge branch '11177/base' into 11177/estrutura-basica
Jul 24, 2018
4f7f874
#11177 iniciado implementação do checkout
Jul 24, 2018
4df926c
#11177 iniciado criação da opção no carrinho
Jul 24, 2018
b258b11
#11177 criado form para adicionar os dados do cartão de crédito
Jul 25, 2018
cfe3507
#11177 agora é possível salvar os dados do cartão na ordem de compra
Jul 25, 2018
baac7ca
#11177 iniciado implementação do bloco de info da ordem
Jul 25, 2018
da0c116
#11177 agora é mostrado os dados do cartão de crédito na area admin
Jul 26, 2018
f9f5fa1
#11177 removido coisas desnecessárias
Jul 26, 2018
00db28e
#11177 adicionado campo para nome no cartão de crédito
Jul 26, 2018
bb55fa9
#11177 atualizado rota para controller
Jul 26, 2018
07c8f78
Merge branch '11177/base' into save-data
Jul 26, 2018
00b6e73
#11177 corrigido nome dos cartões de crédito, removido códigos não ne…
Jul 26, 2018
f241680
#11177 removido array de status
Jul 26, 2018
0405c94
corrigido conflitos
Jul 26, 2018
8013036
Merge branch 'save-data'
Jul 26, 2018
e185814
Merge remote-tracking branch 'upstream/master'
Aug 1, 2018
6483ec0
Merge remote-tracking branch 'upstream/master'
Aug 6, 2018
00b33a5
Merge branch 'master' of github.com:vindi/vindi-magento2
Aug 8, 2018
7a7abfd
Merge remote-tracking branch 'upstream/master'
Aug 10, 2018
caaa1e6
Merge github.com:vindi/vindi-magento2
Aug 13, 2018
a0633ea
Merge github.com:vindi/vindi-magento2
Aug 13, 2018
87ced05
Merge github.com:vindi/vindi-magento2
Aug 13, 2018
7fa35c9
Merge github.com:vindi/vindi-magento2
Aug 13, 2018
5eaeefd
movido arquivos para base para poder utilizar modman e composer
Aug 13, 2018
a784bac
Merge github.com:vindi/vindi-magento2
Aug 13, 2018
05b9a1d
Merge github.com:vindi/vindi-magento2
Aug 13, 2018
1ed2413
adicionado seletor para status da ordem ao ser confirmada
Aug 13, 2018
51e5851
corrigido chamada da função createCustomer fix #30
Aug 14, 2018
74501bb
Merge branch 'master' of https://github.com/vindi/vindi-magento2
brunoroeder Aug 22, 2018
329d88e
validation for existence of some payment method and validation of fil…
cris-silveira Oct 26, 2018
b49737c
Merge pull request #1 from trezoteam/erros-apontados-pelo-qa-do-magen…
cristhianss Oct 26, 2018
06f3518
Merge remote-tracking branch 'upstream/master'
Mar 26, 2019
fbb20e3
Merge branch 'master' of https://github.com/vindi/vindi-magento2
May 17, 2019
c37b3c5
fix ApiKeyValidator Exception Phrase
May 17, 2019
da95390
Envia valores de desconto e acréscimos para a Vindi
Maikco Jul 26, 2019
795c32a
Update Model/Payment/Product.php
Maikco Jul 29, 2019
021cecc
Update Model/Payment/Product.php
Maikco Jul 29, 2019
3e0f784
Update Model/Payment/Product.php
Maikco Jul 30, 2019
88851a7
Inicio dos testes de cupons, taxas e frete
hawshinka Aug 15, 2019
d753896
Correções nos mocks das respostas esperadas
hawshinka Aug 16, 2019
b8168dc
Merge branch 'master' of github.com:haw-trezo/vindi-magento2
hawshinka Aug 16, 2019
3df9ebd
Merge branch 'master' into feature/ajuste_no_envio_de_informacoes_com…
hawshinka Aug 16, 2019
eeaf859
Trocar o nome da classe
hawshinka Aug 16, 2019
613c1de
Testes nas mudanças de status para pedidos com boletos
hawshinka Aug 16, 2019
36f9a34
Testes nos status dos pedidos de acordo com os meios de pagamento
hawshinka Aug 16, 2019
c85911a
Merge pull request #2 from haw-trezo/feature/trezo_unit_tests
brunoroeder Aug 16, 2019
93cab97
Merge branch 'master' of github.com:vindi/vindi-magento2
hawshinka Aug 22, 2019
b7a8353
Merge branch 'master' into feature/trezo_unit_tests
hawshinka Aug 22, 2019
6da4ea7
Ajustes nos testes para conformidade com PR 55
hawshinka Aug 22, 2019
45181cc
Merge pull request #3 from haw-trezo/feature/trezo_unit_tests
brunoroeder Aug 22, 2019
1352283
Insere informações de Teste
laerte-guimaraes Aug 29, 2019
4b9ef6f
Ajusta link de download
laerte-guimaraes Aug 29, 2019
1bc5b6c
Atualizado com o projeto original
Maikco May 21, 2020
0ee41ab
Cancelamento da assinatura se houver rejeição de pagamento no ato da …
Maikco May 23, 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
6 changes: 6 additions & 0 deletions Api/SubscriptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ interface SubscriptionInterface
* @return array|bool
*/
public function create($data = []);

/**
* @param $id
* @return void
*/
public function deleteAndCancelBills($id);
}
3 changes: 2 additions & 1 deletion Model/Payment/AbstractMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ private function handleSubscriptionOrder(InfoInterface $payment, OrderItemInterf
$order->setVindiSubscriptionId($responseData['subscription']['id']);
return $bill['id'];
}
$this->bill->delete($bill['id']);

$this->subscriptionRepository->deleteAndCancelBills($responseData['subscription']['id']);
}

return $this->handleError($order);
Expand Down
8 changes: 8 additions & 0 deletions Model/Vindi/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ public function create($data = [])

return false;
}

/**
* @param $id
*/
public function deleteAndCancelBills($id)
{
$this->api->request("subscriptions/{$id}?cancel_bills=true", 'DELETE');
}
}
14 changes: 7 additions & 7 deletions Test/Unit/OrderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public function setUp()
}

public function testOrderWithTax()
{
{
$vindiProductId = 'taxa';
$amount = 1.00;

$order = $this->createOrderMock($amount, 0.00, 0.00);
$list = $this->createVindiProductManagementMock($vindiProductId)->findOrCreateProductsFromOrder($order);

$this->makeAssertions($list, $vindiProductId, $amount);
}

Expand All @@ -36,7 +36,7 @@ public function testOrderWithDiscount()
$list = $this->createVindiProductManagementMock($vindiProductId)->findOrCreateProductsFromOrder($order);

$this->makeAssertions($list, $vindiProductId, $amount);
}
}

public function testOrderWithShipping()
{
Expand Down Expand Up @@ -67,7 +67,7 @@ private function createApiMock($desiredTestResponse = null)
->getMock();

$requestResponses = [];

$requestResponses[] = [
'product' => [
'id' => 'fake_sku'
Expand Down Expand Up @@ -144,10 +144,10 @@ private function createItemMock($qty = 1, $type = 'simple', $price = 10.99)

$itemMock->method('getName')
->willReturn('FAKE_NAME');

$itemMock->method('getPrice')
->willReturn($price);

$itemMock->method('getProduct')
->willReturn($this->createProductMock($type));

Expand All @@ -166,4 +166,4 @@ private function createProductMock($type)
return $productMock;
}

}
}