/** * @expectedException Svea\ValidationException * @expectedExceptionMessage -missing value : ReturnUrl is required. Use function setReturnUrl(). */ public function testFailOnMissingReturnUrl() { $config = SveaConfig::getDefaultConfig(); $builder = \WebPay::createOrder($config); $order = $builder->addOrderRow(\TestUtil::createHostedOrderRow())->setCountryCode("SE")->setCurrency("SEK")->setClientOrderNumber("34")->usePayPage(); // ->setReturnUrl("myurl.se") $order->getPaymentForm(); }
/** * @expectedException Svea\ValidationException * @expectedExceptionMessage * -missing values : OrderDate is Required. Use function setOrderDate(). */ public function testFailOnMissingOrderDate() { $config = SveaConfig::getDefaultConfig(); $builder = \WebPay::createOrder($config); $order = $builder->addOrderRow(\TestUtil::createHostedOrderRow())->setCountryCode("SE")->addCustomerDetails(\WebPayItem::individualCustomer()->setNationalIdNumber(46111111))->useInvoicePayment(); $order->prepareRequest(); }