/// <summary> /// Initiating a new Klarna Offline Order /// </summary> /// <param name="cart">The cart for the order</param> /// <param name="config">The merchant config to be used</param> /// <param name="terminal">What terminal is the purchase from?</param> /// <param name="phonenumber">Phonenumber of the customer incl countrycode</param> /// <param name="merchantReference">The store-reference for this order</param> /// <param name="postbackUri">The URL on your end that Klanra will push order data to after completion.</param> /// <param name="autoActivate">Should this order be converted to an invoice automatically?</param> public OfflineOrder(List <OrderLine> cart, MerchantConfig config, string terminal, string phonenumber, string merchantReference, Uri postbackUri, bool autoActivate = true) : this(cart, config, terminal, phonenumber, merchantReference, autoActivate) { if (postbackUri.Scheme != "https") { throw new ArgumentException("Postback URL has to be HTTPS"); } _postbackUri = postbackUri; }
/// <summary> /// Initiating a new Klarna Offline Order /// </summary> /// <param name="cart">The cart for the order</param> /// <param name="config">The merchant config to be used</param> /// <param name="terminal">What terminal is the purchase from?</param> /// <param name="phonenumber">Phonenumber of the customer incl countrycode</param> /// <param name="merchantReference">The store-reference for this order</param> /// <param name="autoActivate">Should this order be converted to an invoice automatically?</param> public OfflineOrder(List <OrderLine> cart, MerchantConfig config, string terminal, string phonenumber, string merchantReference, bool autoActivate = true) : base(null) { mobile_no = phonenumber; _status = Status.NotSent; _cart = cart; _config = config; _terminalId = terminal; auto_activate = autoActivate; VerifyPhoneForCountry(); SetMerchantReference1(merchantReference); VerifyCart(); RegexValidator.Validate(terminal); }
public OfflineOrder(string orderId, MerchantConfig config) : base(null, null) { _klarnaId = orderId; _config = config; _status = Status.Sent; }