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: AuthorizationErrorCode.IncorrectNumber,
                                    message: "credit card expired.");

            var orderCheckoutDenied = new OrderCheckoutDenied(orderNum, authorizationError);



            return orderCheckoutDenied;

        }
예제 #2
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"));
 }
예제 #3
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: AuthorizationErrorCode.CardDeclined,
                                    message: "Card was Declined.");

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

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

            return orderCheckoutDenied;
        }