Exemplo n.º 1
0
 public function testIntegrated()
 {
     $checkout = new Checkout();
     $checkout->addItem(new Item('001', 'Plano 1', 1, 12.9));
     $checkout->addItem(new Item('002', 'Plano 2', 1, 99.90000000000001));
     $sender = new Sender('*****@*****.**', 'Adelar Tiemann Junior');
     $sender->setBornDate(new \DateTime('1990-07-05'));
     $checkout->setSender($sender);
     $shipping = new Shipping(1, 12.9);
     $shipping->setAddress('SC', 'Joinville', 12345678, 'Anita Garilbaldi', 'AAAAAAA', 123, 'casa');
     $checkout->setShipping($shipping);
     $module = new ModuleOptions();
     $module->setIsSendBox(true);
     $module->setEmail('*****@*****.**');
     $module->setToken('é para dar erro');
     $request = new PagSeguroRequest($module);
     $this->setExpectedException('\\Exception');
     $request->getResponse($checkout);
 }