public ActionResult Pay(FormCollection fc) { string cvv = fc["Customer.Card.CVV"]; //TODO AR REIKIA VALIDUOTI CVV? ActionResult actionResult = GetSessionProperties(out Customer customer, out Cart cart); _logger.InfoFormat("Payment for cart price [{1}]", cart.Id, cart.Cost); if (actionResult != null) { return(actionResult); } var paymentInfo = _customerPaymentService.Pay(customer.Id, cart, cvv); _logger.InfoFormat("Payment info : [{0}], for cart with id [{1}]", paymentInfo.OrderStatus, cart.Id); Session["Cart"] = null; Session["Count"] = 0; return(View(new PaymentViewModel() { PaymentInfo = paymentInfo, Cart = cart })); }
public void Charge(ICustomerPaymentService paymentService, INotificationService notificationService) { Printer.Print(ConsoleColor.Cyan); // do some internal logic paymentService.Pay(this); notificationService.SendEmail(Email, "Paid successfully", "bla bla bla"); }
public void NotifyByEmail(ICustomerPaymentService paymentService) { Printer.Print(ConsoleColor.Cyan); paymentService.Pay(this); }
public void Charge(ICustomerPaymentService paymentService, INotificationService notificationService) { paymentService.Pay(this); notificationService.SendEmail(Email, "Paid successfully", "bla bla bla"); }