public OrderNotification(OrderCheckoutWrapper<Notification> notificationInfo)
 {
     Id = notificationInfo.Order.Id;
     Status = notificationInfo.Order.Status;
     Description = notificationInfo.Order.Description;
     Warnings = notificationInfo.Warnings;
 }
Beispiel #2
0
 internal OrderNotification(OrderCheckoutWrapper <Notification> notificationInfo)
 {
     Id          = notificationInfo.Order.Id;
     Status      = notificationInfo.Order.Status;
     Description = notificationInfo.Order.Description;
     Custom      = notificationInfo.Order.Custom;
     Warnings    = notificationInfo.Warnings;
 }
        /// <summary>
        /// Validates the Order object fields
        /// Sends the order to riskified server endpoint as configured in the ctor
        /// </summary>
        /// <param name="order">The order checkout object to send</param>
        /// <param name="riskifiedEndpointUrl">the endpoint to which the order should be sent</param>
        /// <returns>The order tranaction result containing status and order id  in riskified servers (for followup only - not used latter) in case of successful transfer</returns>
        /// <exception cref="OrderFieldBadFormatException">On bad format of the order (missing fields data or invalid data)</exception>
        /// <exception cref="RiskifiedTransactionException">On errors with the transaction itself (network errors, bad response data)</exception>
        private OrderNotification SendOrderCheckout(AbstractOrder orderCheckout, Uri riskifiedEndpointUrl)
        {
            if (_validationMode != Validations.Skip)
            {
                orderCheckout.Validate(_validationMode);
            }
            var wrappedOrder      = new OrderCheckoutWrapper <AbstractOrder>(orderCheckout);
            var transactionResult = HttpUtils.JsonPostAndParseResponseToObject <OrderCheckoutWrapper <Notification>, OrderCheckoutWrapper <AbstractOrder> >(riskifiedEndpointUrl, wrappedOrder, _authToken, _shopDomain);

            return(new OrderNotification(transactionResult));
        }
Beispiel #4
0
 internal OrderNotification(OrderCheckoutWrapper <Notification> notificationInfo)
 {
     Id                 = notificationInfo.Order.Id;
     Status             = notificationInfo.Order.Status;
     OldStatus          = notificationInfo.Order.OldStatus;
     Description        = notificationInfo.Order.Description;
     Custom             = notificationInfo.Order.Custom;
     Category           = notificationInfo.Order.Category;
     Warnings           = notificationInfo.Warnings;
     Score              = notificationInfo.Order.Score;
     AuthenticationType = notificationInfo.Order.AuthenticationType;
 }
Beispiel #5
0
 /// <summary>
 /// Validates the Order object fields
 /// Sends the order to riskified server endpoint as configured in the ctor
 /// </summary>
 /// <param name="order">The order checkout object to send</param>
 /// <param name="riskifiedEndpointUrl">the endpoint to which the order should be sent</param>
 /// <returns>The order tranaction result containing status and order id  in riskified servers (for followup only - not used latter) in case of successful transfer</returns>
 /// <exception cref="OrderFieldBadFormatException">On bad format of the order (missing fields data or invalid data)</exception>
 /// <exception cref="RiskifiedTransactionException">On errors with the transaction itself (network errors, bad response data)</exception>
 private OrderNotification SendOrderCheckout(AbstractOrder orderCheckout, Uri riskifiedEndpointUrl)
 {
     if (_validationMode != Validations.Skip)
     {
         orderCheckout.Validate(_validationMode);
     }
     var wrappedOrder = new OrderCheckoutWrapper<AbstractOrder>(orderCheckout);
     var transactionResult = HttpUtils.JsonPostAndParseResponseToObject<OrderCheckoutWrapper<Notification>, OrderCheckoutWrapper<AbstractOrder>>(riskifiedEndpointUrl, wrappedOrder, _authToken, _shopDomain);
     return new OrderNotification(transactionResult);
 }