Beispiel #1
0
        public JsonResult SavePaymentRecord(IList <OrderNow> values)
        {
            if (values != null)
            {
                decimal amount   = GeneralModel.GetTotalAmount(values);
                var     response = ChargeCreditCard.Run(amount);
                if (response.refId != null)
                {
                    Order newOrder = new Order();
                    newOrder.userId     = Convert.ToInt32(Session["UserId"].ToString());
                    newOrder.dateTime   = DateTime.Now.ToString("HH:mm tt dd/MM/yyyy");
                    newOrder.status     = "Pending";
                    newOrder.totalPrice = amount.ToString();
                    newOrder.transId    = response.refId;

                    using (FoodOrderDbContext db = new FoodOrderDbContext())
                    {
                        db.Orders.Add(newOrder);
                        db.SaveChanges();
                    }

                    foreach (var item in values)
                    {
                        decimal itemid   = GeneralModel.GetItemID(item.Name);
                        decimal orderId  = GeneralModel.GetOrderId();
                        decimal quantity = item.count;
                        GeneralModel.SavetoItemDetials(itemid, orderId, quantity);
                        GeneralModel.UpdateQuantity(itemid, quantity);
                    }
                }
                return(Json(new { result = 1 }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { result = 0 }, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public void TestChargeCreditCardAmount()
        {
            foreach (string values in GenerateRandomString(1, 5))
            {
                transactionRequest.amount = Convert.ToDecimal(values);
                response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
                Assert.IsNotNull(response);
                Assert.AreEqual(response.messages.resultCode, messageTypeEnum.Ok);
            }
            foreach (string values in GenerateNegativeString(1, 5))
            {
                if (values != "")
                {
                    transactionRequest.amount = Convert.ToDecimal(values);
                }
                else
                {
                    transactionRequest.amount = 0;
                }

                response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
                Assert.IsNotNull(response);
                Assert.AreNotEqual(response.messages.resultCode, messageTypeEnum.Ok);
            }
        }
Beispiel #3
0
        public ActionResult Pay()
        {
            //firstName = "John",

            //lastName = "Doe",
            string apiLoginId        = WebConfigurationManager.AppSettings["ApiLoginID"];
            string apiTransactionKey = WebConfigurationManager.AppSettings["ApiTransactionKey"];

            ChargeCreditCard.Run(apiLoginId, apiTransactionKey, 1000);
            return(RedirectToAction("Index"));
        }
Beispiel #4
0
 public void HandleCommandValidationFailure(ChargeCreditCard command, ValidationReport validationReport)
 {
     if (validationReport.Failures.All(failure => failure.IsRetryable()))
     {
         // this will terminate further attempts
         RecordEvent(new CreditCardChargeRejected());
     }
     else
     {
         ThrowCommandValidationException(command, validationReport);
     }
 }
Beispiel #5
0
        public void TestChargeCreditCardTerminalNumber()
        {
            foreach (string values in GenerateRandomString(4, 5000))
            {
                transactionRequest.terminalNumber = values;

                response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
                Assert.IsNotNull(response);
                Assert.AreEqual(response.messages.resultCode, messageTypeEnum.Ok);
            }
            foreach (string values in GenerateNegativeString(1, 50))
            {
                transactionRequest.solution.id = values;

                response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
                Assert.IsNotNull(response);
                Assert.AreNotEqual(response.messages.resultCode, messageTypeEnum.Ok);
            }
        }
Beispiel #6
0
        public void TestChargeCreditCardCreditCardNumber()
        {
            string[] possibleValues = { "41111111111111111", "411111111111" };
            foreach (string values in possibleValues)
            {
                transactionRequest.payment = new paymentType
                {
                    Item = new creditCardType
                    {
                        cardNumber     = values,
                        expirationDate = "0718",
                        cardCode       = "123"
                    }
                };

                response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
                Assert.IsNotNull(response);
                Assert.AreNotEqual(response.messages.resultCode, messageTypeEnum.Ok);
            }
        }
Beispiel #7
0
 public void TestChargeCreditInvoiceNumber()
 {
     foreach (string values in GenerateRandomString(2, 20))
     {
         transactionRequest.order = new orderType {
             invoiceNumber = values
         };
         response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
         Assert.IsNotNull(response);
         Assert.AreEqual(response.messages.resultCode, messageTypeEnum.Ok);
     }
     foreach (string values in GenerateNegativeString(1, 20))
     {
         transactionRequest.order = new orderType {
             invoiceNumber = values
         };
         response = ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount(), transactionRequest);
         Assert.IsNotNull(response);
         Assert.AreNotEqual(response.messages.resultCode, messageTypeEnum.Ok);
     }
 }
Beispiel #8
0
        public async Task <ActionResult> Create([Bind(Include = "ID,Email,FirstName,LastName,Company,Password,ConfirmPassword,Radio,FirstNameOnCard,LastNameOnCard,StreetAddress,SecStreetAddress,City,State,Zip,CardNumber,Expiration,CVV,subscriptionLength")] SubscriptionModel subscriptionModel)
        {
            CreditAuthorizations  cA = new CreditAuthorizations();
            CreditCapturePrevious cP = new CreditCapturePrevious();
            ChargeCreditCard      cc = new ChargeCreditCard();
            CreateSubscription    cs = new CreateSubscription();


            if (ModelState.IsValid)
            {
                db.gg.Add(subscriptionModel);
                await db.SaveChangesAsync();

                return(RedirectToAction("UserPage"));
            }

            //  cA.Authorize(subscriptionModel);
            //cc.ChargeCC(subscriptionModel);
            //cs.CreateSub(subscriptionModel);

            return(RedirectToAction("UserPage"));
        }
Beispiel #9
0
        public async Task <IActionResult> ChargeCreditCard([FromBody] ChargeCreditCard charge)
        {
            try
            {
                _logger.LogInformation($"Entered ChargeCard processing : {JsonConvert.SerializeObject(charge)}");

                var bchargecard = await _mediator.Send(charge);

                if (bchargecard)
                {
                    return(Ok("Charge recorded"));
                }

                return(BadRequest("Charge not recorded"));
            }
            catch (Exception e)
            {
                _logger.LogError($"Error in ChargeCard: {e.Message}");
                return(StatusCode(500, e.Message));
            }
            throw new NotImplementedException();
        }
Beispiel #10
0
        public void A_command_can_call_a_domain_service_and_cache_the_value_and_set_its_ETag_on_success()
        {
            var chargeCreditCard = new ChargeCreditCard
            {
                Amount = 10m
            };
            var order = new Order(new CreateOrder(Any.FullName()))
                        .Apply(new AddItem
            {
                Price       = 10m,
                ProductName = Any.CompanyName()
            })
                        .Apply(new Ship())
                        .Apply(chargeCreditCard);

            var charged = order.PendingEvents
                          .Last()
                          .As <Order.CreditCardCharged>();

            charged.ETag.Should().Be(chargeCreditCard.ETag);
            charged.Amount.Should().Be(chargeCreditCard.Amount);
        }
Beispiel #11
0
 public ActionResult Checkout(List <CartItemArray> arr, int total)
 {
     using (FoodOrderEntities db = new FoodOrderEntities())
     {
         var response = ChargeCreditCard.Run(total);
         if (response != null && response.check == true)
         {
             Order order = new Order();
             order.transId    = response.response;
             order.userId     = Convert.ToInt32(Session["UserID"].ToString());
             order.status     = "Pending";
             order.dateTime   = DateTime.Now.ToString("HH:mm tt dd/MM/yyyy");
             order.totalPrice = total.ToString();
             db.Orders.Add(order);
             db.SaveChanges();
             int id = Convert.ToInt32(order.orderId);
             foreach (var item in arr)
             {
                 OrderDetail orderDetail = new OrderDetail();
                 orderDetail.orderId  = id;
                 orderDetail.itemId   = item.id;
                 orderDetail.quantity = item.qty.ToString();
                 db.OrderDetails.Add(orderDetail);
                 db.SaveChanges();
                 var foodItem = db.FoodItems.Where(x => x.itemId == item.id).FirstOrDefault();
                 foodItem.quantity = (Convert.ToInt32(foodItem.quantity) - item.qty).ToString();
                 db.SaveChanges();
             }
             return(Content("true"));
         }
         else
         {
             return(Content("false"));
         }
     }
 }
        /// <summary>
        /// This is where the user goes when the finish their order (filled out the billing information etc)
        /// We take in the information that they gave us and then process the order by sending information to Auth.Net
        /// Then we send them an e-mail receipt of what they ordered.
        /// We return them to a view of their order receipt.
        /// </summary>
        /// <param name="cvm">The checkout view model which we use to store sensitive information temporarily</param>
        /// <returns>The receipt page</returns>
        public async Task <IActionResult> Summary(CheckoutViewModel cvm)
        {
            var user = await _userManager.FindByEmailAsync(User.Identity.Name);

            var basket = await _context.GetBasketById(user);

            var order = await _order.GetOrderByBasketId(basket.ID);

            var basketItems = await _item.GetBasketItems(order.BasketID);

            // This string builder is building out the message for the email.
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("<h3>Thank you for shopping with J and J Furniture</h3>");
            stringBuilder.Append("<h4>Here is a receipt of your purchases</h4>");
            stringBuilder.Append("<h6>Please save this for your own records</h6>");
            stringBuilder.Append("<ol>");

            // This foreach loop is what fills out all the items in the order onto the receipt.
            foreach (BasketItem item in basketItems)
            {
                item.Product = await _inventory.GetProductById(item.ProductID);

                decimal productTotal = item.Product.Price * item.Quantity;
                stringBuilder.Append("<li>");
                stringBuilder.Append("<ul>");
                stringBuilder.Append($"<li>Name: {item.Product.Name}</li>");
                stringBuilder.Append($"<li>Quantity: {item.Quantity}</li>");
                stringBuilder.Append($"<li>Price: {item.Product.Price}</li>");
                stringBuilder.Append($"<li>Total Price: {productTotal}</li>");
                stringBuilder.Append("</ul>");
                stringBuilder.Append("</li>");
            }

            order.BasketItems  = basketItems;
            basket.IsProcessed = true;
            order.IsProcessed  = true;
            order.OrderDate    = DateTime.Today;
            cvm.Order          = order;
            // This updates the order. The main things to be changed is that it has been processed and that the order date is today.
            var update = await _order.UpdateOrder(order.ID, order);

            if (update == "Order Not Found")
            {
                return(RedirectToAction("Index", "Home"));
            }

            stringBuilder.Append("</ol>");
            stringBuilder.Append($"<p>Grand Total: {order.TotalPrice}</p>");
            stringBuilder.Append("<h5>Thank you for shopping with us!</h5>");
            stringBuilder.Append("<h6>We would be honored to have you visit again!</h6>");
            string msg = stringBuilder.ToString();

            // This is where your credit card gets charged.
            ChargeCreditCard creditCharge = new ChargeCreditCard(Configuration);

            creditCharge.RunCard(cvm);

            // This sends the user their receipt through email.
            await _emailSender.SendEmailAsync(user.Email, "J and J Furniture Receipt", msg);

            // This updates the basket so that it is processed and shouldn't be reused.
            await _context.UpdateBasket(basket.ID, basket);

            return(View(order));
        }
Beispiel #13
0
        public HttpResponseMessage Add(HttpRequestMessage request, PaymentViewModel paymentlist)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage Httpresponse = null;
                if (!string.IsNullOrEmpty(paymentlist.sloginUserInfo))
                {
                    var existingUserDb = _userRepository.GetSingleByUsername(paymentlist.sloginUserInfo);
                    if (existingUserDb != null)
                    {
                        var userrestaurantDb = _userrestaurantRepository.GetAll().Where(userrest => userrest.UserId == existingUserDb.ID).ToList();
                        foreach (var userrestaurant in userrestaurantDb)
                        {
                            var subscriptiondb = _subscriptionRepository.GetSingle(userrestaurant.RestaurantId);
                            if (paymentlist != null)
                            {
                                var response = (createTransactionResponse)ChargeCreditCard.Run(paymentlist);
                                //validate
                                if (response != null)
                                {
                                    if (response.messages.resultCode == messageTypeEnum.Ok)
                                    {
                                        if (response.transactionResponse.messages != null)
                                        {
                                            var subscriptionDb = _subscriptionRepository.GetSingle(subscriptiondb.ID);

                                            if (subscriptionDb == null)
                                            {
                                                Httpresponse = request.CreateErrorResponse(HttpStatusCode.NotFound, "Invalid Subscription.");
                                            }
                                            else
                                            {
                                                Subscription newsubscription = new Subscription();
                                                SubscriptionViewModel subscriptionvm = new SubscriptionViewModel();
                                                subscriptionvm.SubscriptionPlanId = Convert.ToInt32(paymentlist.iPlanID.ToString());
                                                subscriptionvm.StartDate = DateTime.UtcNow;
                                                subscriptionvm.EndDate = GetPlanIntervalEnddate(paymentlist.iPlanID);
                                                subscriptionvm.TransId = response.transactionResponse.transId.ToString();
                                                subscriptionDb.UpdateSubscription(subscriptionvm);

                                                _subscriptionRepository.Edit(subscriptionDb);
                                                _unitOfWork.Commit();
                                                Httpresponse = request.CreateResponse(HttpStatusCode.OK, response.transactionResponse);
                                            }
                                        }
                                        else
                                        {
                                            if (response.transactionResponse.errors != null)
                                            {
                                                Httpresponse = request.CreateResponse(HttpStatusCode.BadRequest, response.transactionResponse.errors);
                                            }
                                        }
                                    }
                                    else
                                    {
                                        if (response.transactionResponse != null && response.transactionResponse.errors != null)
                                        {
                                            Httpresponse = request.CreateResponse(HttpStatusCode.BadRequest, response.transactionResponse.errors);
                                        }
                                        else
                                        {
                                        }
                                    }
                                }
                                else
                                {
                                    Httpresponse = request.CreateResponse(HttpStatusCode.BadRequest, "Invalid Payment");
                                }
                            }
                        }
                    }
                }

                return Httpresponse;
            }));
        }
Beispiel #14
0
        //[Authorize(Policy = PermissionsList.PermissionsOrderAdd)]
        public async Task <IActionResult> AddOrder([FromBody] OrderModel order)
        {
            var         dishNames = order.Dishes.Select(d => d.Name).ToList();
            List <Dish> dishes    = (List <Dish>) await _orderRepository.GetDishList(dishNames);

            bool isPaid = false;

            if (dishes.Count == 0 ||
                User.Identity.Name != null ||
                !ModelState.IsValid)
            {
                return(BadRequest());
            }

            Guid orderId = Guid.NewGuid();

            decimal          totalPrice  = 0;
            var              lineItems   = new List <lineItemType>();
            List <OrderDish> orderDishes = new List <OrderDish>();

            var  userId    = User.Claims.Where(c => c.Type == ClaimTypes.NameIdentifier).FirstOrDefault();
            User orderUser = await _userRepository.GetUserById(userId.Value);

            Order newOrder = new Order()
            {
                Id                  = orderId,
                User                = orderUser,
                OrderTime           = DateTime.Now,
                OrderExpirationTime = DateTime.Now.AddHours(1),
                IsForDelivery       = order.IsForDelivery,
                IsCancelled         = false,
                IsClosed            = false
            };


            dishes.ForEach(dish =>
            {
                var quantity = order.Dishes.Where(d => d.Name == dish.Name).FirstOrDefault().Quantity;
                lineItems.Add(new lineItemType
                {
                    itemId    = dish.Id.ToString(),
                    name      = dish.Name,
                    quantity  = quantity,
                    unitPrice = (decimal)dish.DishPrice
                });

                orderDishes.Add(new OrderDish
                {
                    Id       = Guid.NewGuid(),
                    Dish     = dish,
                    Order    = newOrder,
                    Quantity = quantity
                });

                totalPrice += (decimal)dish.DishPrice * quantity;
            });

            newOrder.TotalPrice = (float)totalPrice;
            newOrder.OrderItems = orderDishes;

            switch (order.PaymentType)
            {
            case PaymentTypes.CreditCard:
            {
                var creditCard = new creditCardType
                {
                    cardNumber     = order.CreditCard.CardNumber,
                    expirationDate = order.CreditCard.ExpirationDate,
                    cardCode       = order.CreditCard.CCV
                };

                var billingAddress = new customerAddressType
                {
                    firstName = order.BillingAddressModel.FirstName,
                    lastName  = order.BillingAddressModel.LastName,
                    address   = order.BillingAddressModel.Address,
                    city      = order.BillingAddressModel.City,
                    zip       = order.BillingAddressModel.ZIP
                };

                var response = ChargeCreditCard.Run(creditCard, billingAddress, lineItems, totalPrice);
                if (response.messages.resultCode != messageTypeEnum.Ok)
                {
                    return(BadRequest(new { error = "Couldn't process transaction" }));
                }
                else
                {
                    isPaid = true;
                }
                break;
            }

            case PaymentTypes.Cash:
            {
                break;
            }
            }

            newOrder.IsPaid = isPaid;

            _orderRepository.Create(newOrder);

            if (order.IsForDelivery)
            {
                Address address = await _addressRepository.GetById(order.DeliveryAddress.Id);

                if (address == null)
                {
                    address = new Address()
                    {
                        Id      = Guid.NewGuid(),
                        Name    = order.DeliveryAddress.Name,
                        City    = await _cityRepository.GetById(order.DeliveryAddress.City.Id),
                        Country = await _countryRepository.GetById(order.DeliveryAddress.Country.Id),
                        Street  = order.DeliveryAddress.Street
                    };

                    _addressRepository.Create(address);
                }

                Delivery delivery = new Delivery()
                {
                    Id = Guid.NewGuid(),
                    DeliveryAddress = address,
                    Order           = newOrder,
                    IsDelivered     = false
                };

                _deliveryRepository.Create(delivery);
            }

            return(Ok(new { order_id = orderId }));
        }
        private static void RunMethod(string methodName)
        {
            // These are default transaction keys.
            // You can create your own keys in seconds by signing up for a sandbox account here: https://developer.authorize.net/sandbox/
            string apiLoginId     = "5KP3u95bQpv";
            string transactionKey = "4Ktq966gC55GAX7S";

            string transactionAmount;
            string transactionId = string.Empty;

            switch (methodName)
            {
            case "ValidateCustomerPaymentProfile":
                ValidateCustomerPaymentProfile.Run(apiLoginId, transactionKey);
                break;

            case "UpdateCustomerShippingAddress":
                UpdateCustomerShippingAddress.Run(apiLoginId, transactionKey);
                break;

            case "UpdateCustomerProfile":
                UpdateCustomerProfile.Run(apiLoginId, transactionKey);
                break;

            case "UpdateCustomerPaymentProfile":
                UpdateCustomerPaymentProfile.Run(apiLoginId, transactionKey);
                break;

            case "GetCustomerShippingAddress":
                GetCustomerShippingAddress.Run(apiLoginId, transactionKey);
                break;

            case "GetCustomerProfileIds":
                GetCustomerProfileIds.Run(apiLoginId, transactionKey);
                break;

            case "GetCustomerProfile":
                GetCustomerProfile.Run(apiLoginId, transactionKey);
                break;

            case "GetCustomerPaymentProfile":
                GetCustomerPaymentProfile.Run(apiLoginId, transactionKey);
                break;

            case "DeleteCustomerShippingAddress":
                DeleteCustomerShippingAddress.Run(apiLoginId, transactionKey);
                break;

            case "DeleteCustomerProfile":
                DeleteCustomerProfile.Run(apiLoginId, transactionKey);
                break;

            case "DeleteCustomerPaymentProfile":
                DeleteCustomerPaymentProfile.Run(apiLoginId, transactionKey);
                break;

            case "CreateCustomerShippingAddress":
                CreateCustomerShippingAddress.Run(apiLoginId, transactionKey);
                break;

            case "CreateCustomerProfileFromTransaction":
                CreateCustomerProfileFromTransaction.Run(apiLoginId, transactionKey);
                break;

            case "GetTransactionDetails":
                GetTransactionDetails.Run(apiLoginId, transactionKey);
                break;

            case "GetTransactionList":
                GetTransactionList.Run(apiLoginId, transactionKey);
                break;

            //case "CreateAnApplePayTransaction":
            //    CreateAnApplePayTransaction.Run(apiLoginId, transactionKey);
            //    break;
            case "DecryptVisaCheckoutData":
                DecryptVisaCheckoutData.Run(apiLoginId, transactionKey);
                break;

            case "CreateVisaCheckoutTransaction":
                CreateVisaCheckoutTransaction.Run(apiLoginId, transactionKey);
                break;

            case "ChargeCreditCard":
                ChargeCreditCard.Run(apiLoginId, transactionKey);
                break;

            case "CaptureOnly":
                CaptureOnly.Run(apiLoginId, transactionKey);
                break;

            case "CapturePreviouslyAuthorizedAmount":
                Console.WriteLine("Enter An Transaction Amount");
                transactionAmount = Console.ReadLine();

                Console.WriteLine("Enter An Transaction ID");
                transactionId = Console.ReadLine();

                CapturePreviouslyAuthorizedAmount.Run(apiLoginId, transactionKey, Convert.ToDecimal(transactionAmount), transactionId);
                break;

            case "CaptureFundsAuthorizedThroughAnotherChannel":
                CaptureFundsAuthorizedThroughAnotherChannel.Run(apiLoginId, transactionKey);
                break;

            case "AuthorizeCreditCard":
                AuthorizeCreditCard.Run(apiLoginId, transactionKey);
                break;

            case "Refund":
                Console.WriteLine("Enter An Transaction Amount");
                transactionAmount = Console.ReadLine();

                Console.WriteLine("Enter An Transaction ID");
                transactionId = Console.ReadLine();

                RefundTransaction.Run(apiLoginId, transactionKey, Convert.ToDecimal(transactionAmount), transactionId);
                break;

            case "Void":
                Console.WriteLine("Enter An Transaction ID");
                transactionId = Console.ReadLine();

                VoidTransaction.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "DebitBankAccount":
                DebitBankAccount.Run(apiLoginId, transactionKey);
                break;

            case "CreditBankAccount":
                Console.WriteLine("Enter An Transaction ID");
                transactionId = Console.ReadLine();

                CreditBankAccount.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "ChargeCustomerProfile":
                ChargeCustomerProfile.Run(apiLoginId, transactionKey);
                break;

            case "ChargeTokenizedCard":
                ChargeTokenizedCreditCard.Run(apiLoginId, transactionKey);
                break;

            case "PayPalVoid":
                PayPalVoid.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "PayPalAuthorizeCapture":
                PayPalAuthorizeCapture.Run(apiLoginId, transactionKey);
                break;

            case "PayPalAuthorizeCaptureContinue":
                PayPalAuthorizeCaptureContinue.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "PayPalAuthorizeOnly":
                PayPalAuthorizeOnly.Run(apiLoginId, transactionKey);
                break;

            case "PayPalAuthorizeOnlyContinue":
                PayPalAuthorizeCaptureContinue.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "PayPalCredit":
                PayPalCredit.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "PayPalGetDetails":
                PayPalGetDetails.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "PayPalPriorAuthorizationCapture":
                PayPalPriorAuthorizationCapture.Run(apiLoginId, transactionKey, transactionId);
                break;

            case "CancelSubscription":
                CancelSubscription.Run(apiLoginId, transactionKey);
                break;

            case "CreateSubscription":
                CreateSubscription.Run(apiLoginId, transactionKey);
                break;

            case "GetSubscriptionList":
                GetListSubscriptions.Run(apiLoginId, transactionKey);
                break;

            case "GetSubscriptionStatus":
                GetSubscriptionStatus.Run(apiLoginId, transactionKey);
                break;

            case "UpdateSubscription":
                UpdateSubscription.Run(apiLoginId, transactionKey);
                break;

            case "CreateCustomerProfile":
                CreateCustomerProfile.Run(apiLoginId, transactionKey);
                break;

            case "CreateCustomerPaymentProfile":
                CreateCustomerPaymentProfile.Run(apiLoginId, transactionKey);
                break;

            case "GetUnsettledTransactionList":
                GetUnsettledTransactionList.Run(apiLoginId, transactionKey);
                break;

            case "GetBatchStatistics":
                GetBatchStatistics.Run(apiLoginId, transactionKey);
                break;

            case "GetSettledBatchList":
                GetSettledBatchList.Run(apiLoginId, transactionKey);
                break;

            default:
                ShowUsage();
                break;
            }
        }
Beispiel #16
0
 public ANetApiResponse TestChargeCreditCard()
 {
     return(ChargeCreditCard.Run(apiLoginId, transactionKey, GetAmount()));
 }
Beispiel #17
0
 public AccountCharged(ChargeCreditCard chargeInfo, bool success)
 {
     ChargeInfo = chargeInfo;
     Success    = success;
 }