/// <summary> /// Create a checkout denied /// </summary> /// <param name="merchantOrderId">The unique id of the order at the merchant systems</param> /// <param name="authorizationError">An object describing the failed result of an authorization attempt by a payment gateway</param> public OrderCheckoutDenied(int merchantOrderId, AuthorizationError authorizationError) : base(merchantOrderId) { this.AuthorizationError = authorizationError; }
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; }
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; }