Exemple #1
0
        public HttpResponseMessage SubmitTransfer(TransferRequestDto model)
        {
            if (!_processController.ValidateRequest(model as RequestBase))
            {
                return(Request.CreateErrorResponse(HttpStatusCode.Unauthorized, new UnauthorizedAccessException("Unauthorized access. Please try to log in again.")));
            }
            var response = _processController.SubmitTransfer_new(model);

            return(Request.CreateResponse(HttpStatusCode.OK, response.CustomerMessage));
        }
        internal SMSContentModel SubmitTransfer_new(TransferRequestDto model)
        {
            var Messagemodel = _dbHelper.SubmitTransfer_new(model);

            if (Messagemodel.status == "S")
            {
                var response    = new TradeTranResponseModel();
                var status_cust = _dbHelper.SendMessage(Messagemodel.CustomerMessage, Messagemodel.CustomerMobile, Messagemodel.CustomerEmail);
                var status_trad = _dbHelper.SendMessage(Messagemodel.TraderMessage, Messagemodel.TraderMobile, Messagemodel.TraderEmail);
                return(Messagemodel);
            }
            else
            {
                return(Messagemodel);
            }
        }
 public static AccountDto GetPeerAccount(this TransferRequestDto transferRequest, long accountId)
 {
     return(transferRequest.SenderAccount.Id == accountId
         ? transferRequest.ReceiverAccount
         : transferRequest.SenderAccount);
 }
 internal string SubmitTransfer(TransferRequestDto model)
 {
     return(_dbHelper.SubmitTransfer(model));
 }