コード例 #1
0
 public function test_paymentPlanPricePerMonth_returns_PaymentPlanPricePerMonth()
 {
     $campaigns = WebPay::getPaymentPlanParams(\Svea\SveaConfig::getDefaultConfig())->setCountryCode("SE")->doRequest();
     $this->assertTrue($campaigns->accepted);
     $pricesPerMonth = \Svea\Helper::paymentPlanPricePerMonth(2000, $campaigns, true);
     $this->assertInstanceOf("Svea\\WebService\\PaymentPlanPricePerMonth", $pricesPerMonth);
     //        $this->assertEquals(213060, $pricesPerMonth->values[0]['campaignCode']);//don't test to be flexible
     $this->assertEquals(2029, $pricesPerMonth->values[0]['pricePerMonth']);
 }
コード例 #2
0
 public function test_add_publickey_for_private_customer_full_request()
 {
     $config = \Svea\SveaConfig::getTestConfig();
     $order = WebPay::createOrder($config)->addCustomerDetails(WebPayItem::companyCustomer()->setCompanyName('mycomp')->setNationalIdNumber('164701161111')->setPublicKey('ac0f2573b58ff523'))->setCountryCode('SE')->addOrderRow(WebPayItem::orderRow()->setAmountIncVat(125.0)->setVatPercent(25)->setQuantity(1))->setOrderDate(date('c'))->useInvoicePayment()->prepareRequest();
     $this->assertEquals('ac0f2573b58ff523', $order->request->CreateOrderInformation->CustomerIdentity->PublicKey);
 }