@@ 39-48 (lines=10) @@ | ||
36 | $this->assertNotEmpty($payment->getFundingInstrument()->boleto); |
|
37 | } |
|
38 | ||
39 | public function testCreditCardPCIStore() |
|
40 | { |
|
41 | $this->mockHttpSession($this->body_order); |
|
42 | $order = $this->createOrder()->create(); |
|
43 | $cc = '5555666677778884'; |
|
44 | $this->mockHttpSession($this->body_cc_pay_pci_store); |
|
45 | $payment = $order->payments()->setCreditCard(5, 2018, $cc, 123, $this->createCustomer(), false)->execute(); |
|
46 | $this->assertFalse($payment->getFundingInstrument()->creditCard->store); |
|
47 | $this->assertNotEmpty($payment->getId()); |
|
48 | } |
|
49 | ||
50 | public function testShouldCreateEscrowPaymentWithCreditCard() |
|
51 | { |
|
@@ 50-61 (lines=12) @@ | ||
47 | $this->assertNotEmpty($payment->getId()); |
|
48 | } |
|
49 | ||
50 | public function testShouldCreateEscrowPaymentWithCreditCard() |
|
51 | { |
|
52 | $this->mockHttpSession($this->body_order); |
|
53 | $order = $this->createOrder()->create(); |
|
54 | $cc = '5555666677778884'; |
|
55 | $this->mockHttpSession($this->body_cc_pay_pci_escrow); |
|
56 | $payment = $order->payments() |
|
57 | ->setCreditCard(5, 2018, $cc, 123, $this->createCustomer(), false) |
|
58 | ->setEscrow('teste de descricao') |
|
59 | ->execute(); |
|
60 | $this->assertEquals('teste de descricao', $payment->getEscrow()->description); |
|
61 | } |
|
62 | } |
|
63 |