Beispiel #1
0
        public PaymentMethodDetails DoPayment()
        {
            PaymentMethodDetails returnedDetails = new PaymentMethodDetails();

            switch (_paymentMethod.ToLowerInvariant())
            {
            case "paytm":
                PayTM _payTMHandler = new PayTM();
                returnedDetails.paymentMethod      = _paymentMethod;
                returnedDetails.userDetails        = _payTMHandler.GetDetails(_userDetails);
                returnedDetails.confirmationStatus = _payTMHandler.GetConfirmation();
                if (returnedDetails.confirmationStatus is true)
                {
                    returnedDetails.paymentReceiptStatus = _payTMHandler.MakePayment();
                }
                return(returnedDetails);

            default:
                break;
            }

            return(returnedDetails);
        }
Beispiel #2
0
 public PaymentHandler(PaymentMethodDetails paymentMethodDetails)
 {
     _userDetails   = paymentMethodDetails.userDetails;
     _paymentMethod = paymentMethodDetails.paymentMethod;
 }