public void PaymentOptions_CloseWindow_DefaultsToTrue() { // Act var paymentOptions = new PaymentOptions(); // Assert Assert.IsTrue(paymentOptions.CloseWindow); }
private OrderRequest(OrderType type, string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { Type = type; OrderId = orderId; Description = description; AmountInCents = amountInCents; CurrencyCode = currencyCode; PaymentOptions = paymentOptions; }
public static OrderRequest CreateRedirect(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return new OrderRequest( OrderType.Redirect, orderId, description, amountInCents, currencyCode, paymentOptions); }
private OrderRequest(OrderType type, string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { Type = type; OrderId = orderId; Description = description; AmountInCents = amountInCents; CurrencyCode = currencyCode; PaymentOptions = paymentOptions; CustomInfo = new ExpandoObject(); }
public static OrderRequest CreateDirectIdeal(string issuerId, string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "iDEAL", GatewayInfo = GatewayInfo.IDeal(issuerId) }; }
public void PaymentOptions_Serialize_PropertyNamesAsExpected() { // Arrange var paymentOptions = new PaymentOptions(); // Act var serializedObject = JsonConvert.SerializeObject(paymentOptions); // Assert Assert.AreEqual(@"{ ""notification_url"": null, ""redirect_url"":null, ""cancel_url"":null, ""close_window"":true }".RemoveWhiteSpace(), serializedObject.RemoveWhiteSpace()); }
public static OrderRequest CreateDirectIdeal(string issuerId, string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return(new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "iDEAL", GatewayInfo = GatewayInfo.IDeal(issuerId) }); }
public static OrderRequest CreateDirectIdealQR(GatewayInfo GatewayInfo, string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return(new OrderRequest( OrderType.Redirect,//Also supported empty or OrderType.Direct orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "IDEALQR", GatewayInfo = GatewayInfo.IDealQR( GatewayInfo.QrSize, GatewayInfo.MaxAmount, GatewayInfo.AllowMultiple, GatewayInfo.AllowChangeAmount) }); }
public static OrderRequest CreateFastCheckoutOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions) { return(new OrderRequest( OrderType.FastCheckout, orderId, description, amountInCents, currencyCode, paymentOptions) { ShoppingCart = shoppingCart, CheckoutOptions = checkoutOptions }); }
public static OrderRequest CreateDirectEinvoiceOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions, Customer customer, DeliveryAddress deliveryAddress) { return(new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "EINVOICE", GatewayInfo = gatewayInfo, ShoppingCart = shoppingCart, Customer = customer, DeliveryAddress = deliveryAddress, CheckoutOptions = checkoutOptions }); }
public static OrderRequest CreateRedirectPayAfterDeliveryOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions, Customer customer) { return(new OrderRequest( OrderType.Redirect, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "PAYAFTER", GatewayInfo = gatewayInfo, ShoppingCart = shoppingCart, Customer = customer, CheckoutOptions = checkoutOptions }); }
public static OrderRequest CreateDirectBankTransfer(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return(new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "BANKTRANS" }); }
public static OrderRequest CreateRedirectPayAfterDeliveryOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, Customer customer) { return(CreateRedirectPayAfterDeliveryOrder(orderId, description, amountInCents, currencyCode, paymentOptions, gatewayInfo, shoppingCart, new CheckoutOptions(), customer)); }
public static OrderRequest CreateFastCheckoutOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions) { return new OrderRequest( OrderType.FastCheckout, orderId, description, amountInCents, currencyCode, paymentOptions) { ShoppingCart = shoppingCart, CheckoutOptions = checkoutOptions }; }
public static OrderRequest CreateRedirect(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return(new OrderRequest( OrderType.Redirect, orderId, description, amountInCents, currencyCode, paymentOptions)); }
public static OrderRequest CreateDirectKlarnaOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions, Customer customer, DeliveryAddress deliveryAddress) { return new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "KLARNA", GatewayInfo = gatewayInfo, ShoppingCart = shoppingCart, Customer = customer, DeliveryAddress = deliveryAddress, CheckoutOptions = checkoutOptions }; }
public static OrderRequest CreateDirectPayAfterDeliveryOrder(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, GatewayInfo gatewayInfo, ShoppingCart shoppingCart, CheckoutOptions checkoutOptions, Customer customer) { return new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "PAYAFTER", GatewayInfo = gatewayInfo, ShoppingCart = shoppingCart, Customer = customer, CheckoutOptions = checkoutOptions }; }
public static OrderRequest CreateRedirectWithTemplate(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions, string TemplateId, Template Template) { return(new OrderRequest( OrderType.Redirect, orderId, description, amountInCents, currencyCode, paymentOptions) { TemplateId = TemplateId, Template = Template }); }
public static OrderRequest CreateDirectBankTransfer(string orderId, string description, int amountInCents, string currencyCode, PaymentOptions paymentOptions) { return new OrderRequest( OrderType.Direct, orderId, description, amountInCents, currencyCode, paymentOptions) { GatewayId = "BANKTRANS" }; }