예제 #1
0
        public async Task <GetMerchantAccountDetailsDto> GetMerchantAccountDetails(MerchantAccountDto MerchantAccountDto)
        {
            var MerchantAccountDetails = (from s in this.Repository
                                          where s.Email == MerchantAccountDto.MerchantEmail && s.MerchantAccountDetails.Id > 0
                                          select new
            {
                s.MerchantAccountDetails.Id,
                s.MerchantAccountDetails.MerchantContractNumber,
                s.MerchantAccountDetails.CR,
                s.MerchantAccountDetails.Brand_Account,
                s.MerchantAccountDetails.Bank_Name,
                s.MerchantAccountDetails.AC_Number,
                s.MerchantAccountDetails.Address,
                s.MerchantAccountDetails.Swift_code,
            }).SingleOrDefault();
            GetMerchantAccountDetailsDto GetMerchantAccountDetailsDto = new GetMerchantAccountDetailsDto();

            if (MerchantAccountDetails != null)
            {
                if (!string.IsNullOrEmpty(MerchantAccountDetails.MerchantContractNumber))
                {
                    GetMerchantAccountDetailsDto.Id = MerchantAccountDetails.Id;
                    GetMerchantAccountDetailsDto.MerchantContractNumber = MerchantAccountDetails.MerchantContractNumber;
                    GetMerchantAccountDetailsDto.AccountCR     = MerchantAccountDetails.CR;
                    GetMerchantAccountDetailsDto.BrandAccount  = MerchantAccountDetails.Brand_Account;
                    GetMerchantAccountDetailsDto.BankName      = MerchantAccountDetails.Bank_Name;
                    GetMerchantAccountDetailsDto.AccountNumber = MerchantAccountDetails.AC_Number;
                    GetMerchantAccountDetailsDto.Address       = MerchantAccountDetails.Address;
                    GetMerchantAccountDetailsDto.Swiftcode     = MerchantAccountDetails.Swift_code;
                }
            }

            return(GetMerchantAccountDetailsDto);
        }
        public async Task <IActionResult> getMerchantAccountDetails([FromBody]  MerchantAccountDto MerchantAccountDto)
        {
            try
            {
                var _getALLMerchantDetails = await _MerchantService.GetMerchantAccountDetails(MerchantAccountDto);

                return(Ok(_getALLMerchantDetails));
            }

            catch (Exception err)
            {
                return(BadRequest(new GenericResultDto <string> {
                    Result = err.Message
                }));
            }
        }
예제 #3
0
        /// <summary>
        /// Update a merchant account status
        /// </summary>
        /// <param name="shortName">Merchant account shortname</param>
        /// <param name="merchantAccountStatusCode">Merchant account status code</param>
        /// <returns>Merchant account status code updated or not</returns>
        public bool UpdateMerchantAccountStatus(string shortName, string merchantAccountStatusCode)
        {
            var request = new MerchantAccountDto
                {
                    ShortName = shortName,
                    MerchantAccountStatusCode = merchantAccountStatusCode
                };

            return CallPostEndPoint<bool, MerchantAccountDto>(DataSourceConstants.EVIIVO_PAYMEMT_SERVICE_UPDATE_MERCHANT_ACCOUNT_STATUS_PATH, request);   
        }