public void TestInvoiceForIndividualFromNl() { CreateOrderEuResponse response = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig()) .AddOrderRow(TestingTool.CreateOrderRowNl()) .AddCustomerDetails(TestingTool.CreateIndividualCustomer(CountryCode.NL)) .SetCountryCode(CountryCode.NL) .SetClientOrderNumber(TestingTool.DefaultTestClientOrderNumber) .SetOrderDate(TestingTool.DefaultTestDate) .SetCurrency(Currency.EUR) .UseInvoicePayment() .DoRequest(); Assert.That(response.ResultCode, Is.EqualTo(0)); Assert.That(response.Accepted, Is.True); Assert.That(response.CreateOrderResult.SveaWillBuyOrder, Is.True); Assert.That(response.CreateOrderResult.Amount, Is.EqualTo(212.00)); Assert.That(response.CreateOrderResult.OrderType, Is.EqualTo("Invoice")); //Returns hardcoded values that slightly differ from input Assert.That(response.CreateOrderResult.CustomerIdentity.Email, Is.EqualTo("*****@*****.**")); Assert.That(response.CreateOrderResult.CustomerIdentity.IpAddress, Is.Null); Assert.That(response.CreateOrderResult.CustomerIdentity.CountryCode, Is.EqualTo("NL")); Assert.That(response.CreateOrderResult.CustomerIdentity.HouseNumber, Is.EqualTo("42")); Assert.That(response.CreateOrderResult.CustomerIdentity.CustomerType, Is.EqualTo(CustomerType.Individual)); Assert.That(response.CreateOrderResult.CustomerIdentity.PhoneNumber, Is.EqualTo("999999")); Assert.That(response.CreateOrderResult.CustomerIdentity.FullName, Is.EqualTo("Sneider Boasman")); Assert.That(response.CreateOrderResult.CustomerIdentity.Street, Is.EqualTo("Gate")); Assert.That(response.CreateOrderResult.CustomerIdentity.CoAddress, Is.Null); Assert.That(response.CreateOrderResult.CustomerIdentity.ZipCode, Is.EqualTo("1102 HG")); Assert.That(response.CreateOrderResult.CustomerIdentity.Locality, Is.EqualTo("BARENDRECHT")); }
public void TestNlCompanyIdentity() { CreateOrderEuResponse response = WebpayConnection.CreateOrder(SveaConfig.GetDefaultConfig()) .AddOrderRow(TestingTool.CreateOrderRowNl()) .AddCustomerDetails(Item.CompanyCustomer() .SetCompanyName("Svea bakkerij 123") .SetVatNumber("NL123456789A12") .SetStreetAddress("broodstraat", "1") .SetZipCode("1111 CD") .SetLocality("BARENDRECHT")) .SetCountryCode(CountryCode.NL) .SetClientOrderNumber( TestingTool.DefaultTestClientOrderNumber) .SetOrderDate(TestingTool.DefaultTestDate) .SetCurrency(Currency.EUR) .UseInvoicePayment() .DoRequest(); Assert.That(response.ResultCode, Is.EqualTo(0)); Assert.That(response.CreateOrderResult.CustomerIdentity.CustomerType, Is.EqualTo(CustomerType.Company)); Assert.That(response.Accepted, Is.True); }