Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | public function testCreditCardPCI() |
||
15 | { |
||
16 | $this->mockHttpSession($this->body_order); |
||
17 | $order = $this->createOrder()->create(); |
||
18 | $this->mockHttpSession($this->body_cc_pay_pci); |
||
19 | $cc = '5555666677778884'; |
||
20 | $payment = $order->payments()->setCreditCard(5, 2018, $cc, 123, $this->createCustomer())->execute(); |
||
21 | $this->assertNotEmpty($payment->getFundingInstrument()->creditCard); |
||
22 | $first6 = $payment->getFundingInstrument()->creditCard->first6; |
||
23 | $last4 = $payment->getFundingInstrument()->creditCard->last4; |
||
24 | $this->assertEquals($first6, substr($cc, 0, 6)); |
||
25 | $this->assertEquals($last4, substr($cc, -4)); |
||
26 | } |
||
27 | } |
||
28 |