Example #1
0
        private static OrderCheckoutDenied GenerateOrderCheckoutDenied(int orderNum)
        {
            var authorizationError = new AuthorizationError(
                createdAt: new DateTime(2013, 12, 8, 14, 12, 12, DateTimeKind.Local),                     // make sure to initialize DateTime with the correct timezone
                errorCode: "Card Declined",
                message: "Card was Declined.");

            var payments = new[] {
                new CreditCardPaymentDetails(
                    avsResultCode: "Y",
                    cvvResultCode: "n",
                    creditCardBin: "124580",
                    creditCardCompany: "Visa",
                    creditCardNumber: "XXXX-XXXX-XXXX-4242",
                    creditCardToken: "2233445566778899"
                    )
                {
                    AuthorizationError = authorizationError
                }
            };

            var orderCheckoutDenied = new OrderCheckoutDenied(orderNum.ToString())
            {
                PaymentDetails = payments
            };

            return(orderCheckoutDenied);
        }
 /// <summary>
 /// Validates the Order checkout object fields (All fields except merchendOrderId are optional)
 /// Sends a new order checkout to Riskified Servers (without Submit for analysis)
 /// </summary>
 /// <param name="order">The Order checkout to create</param>
 /// <returns>The order checkout notification result containing status,description and sent order id 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>
 public OrderNotification CheckoutDenied(OrderCheckoutDenied orderCheckout)
 {
     return(SendOrderCheckout(orderCheckout, HttpUtils.BuildUrl(_env, "/api/checkout_denied")));
 }
Example #3
0
 /// <summary>
 /// Validates the Order checkout object fields (All fields except merchendOrderId are optional)
 /// Sends a new order checkout to Riskified Servers (without Submit for analysis)
 /// </summary>
 /// <param name="order">The Order checkout to create</param>
 /// <returns>The order checkout notification result containing status,description and sent order id 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>
 public OrderNotification CheckoutDenied(OrderCheckoutDenied orderCheckout)
 {
     return(SendOrderCheckout(orderCheckout, HttpUtils.BuildUrl(_riskifiedBaseWebhookUrl, "/api/checkout_denied")));
 }