|
@@ 216-228 (lines=13) @@
|
| 213 |
|
->setHolder('Jose Silva', '22222222222', 'CPF'); |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
private function paymentBoleto($returnPayment = true) |
| 217 |
|
{ |
| 218 |
|
$this->mockHttpSession($this->body_order); |
| 219 |
|
$order = $this->createOrder()->create(); |
| 220 |
|
$this->mockHttpSession($this->body_billet_pay); |
| 221 |
|
$payment = $order->payments() |
| 222 |
|
->setBoleto(new \DateTime('today +1day'), 'http://dev.moip.com.br/images/logo-header-moip.png') |
| 223 |
|
->execute(); |
| 224 |
|
$this->mockHttpSession(''); |
| 225 |
|
$payment->authorize(); |
| 226 |
|
|
| 227 |
|
return $returnPayment ? $payment : $order; |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
private function paymentCreditCard($returnPayment = true) |
| 231 |
|
{ |
|
@@ 230-238 (lines=9) @@
|
| 227 |
|
return $returnPayment ? $payment : $order; |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
private function paymentCreditCard($returnPayment = true) |
| 231 |
|
{ |
| 232 |
|
$this->mockHttpSession($this->body_order); |
| 233 |
|
$order = $this->createOrder()->create(); |
| 234 |
|
$this->mockHttpSession($this->body_cc_pay_pci); |
| 235 |
|
$payment = ($order->payments()->setCreditCard(5, 2018, '5555666677778884', 123, $this->createHolder())->execute()); |
| 236 |
|
|
| 237 |
|
return $returnPayment ? $payment : $order; |
| 238 |
|
} |
| 239 |
|
} |
| 240 |
|
|