gp_GiftBalanceInq_Result ICardRepository.GiftCardInquiry( String MerchantID, String Clerk, String WebOrDial, String MerchantSequenceNumber, String TerminalID, DateTime LocalTime, String CardNumber) { InitializeConnection(); String CleanCardNumber = extractCardNumber(CardNumber); String EncryptedCardNumber = GiftEncryption.Encrypt(CleanCardNumber); gp_GiftBalanceInq_Result Res = GiftEntity.gp_GiftBalanceInq( MerchantID, Clerk, WebOrDial, MerchantSequenceNumber, TerminalID, LocalTime, EncryptedCardNumber).FirstOrDefault(); return(Res); }
// G i f t C a r d I n q u i r y ReceiptInformation ITransactionService.GiftCardInquiry( String MerchantID, String ClerkID, Char WebOrDial, String MerchantSequenceNumber, String TerminalID, DateTime LocalTime, String CardNumber) { ReceiptInformation ReceiptInfo = new ReceiptInformation(); String CardToUse; if (!MapPhoneToCardNumber(MerchantID, CardNumber, out CardToUse)) { ReceiptInfo.ErrorCode = "PHNER"; ReceiptInfo.ResponseCode = 'E'; ReceiptInfo.ApprovalMessage = "Phone Number not found"; return(ReceiptInfo); } CardNumber = CardToUse; ICardRepository CardData = new CardRepository(); gp_GiftBalanceInq_Result Res = CardData.GiftCardInquiry( MerchantID, ClerkID, Convert.ToString(WebOrDial), MerchantSequenceNumber, TerminalID, LocalTime, CardNumber); ReceiptInfo.ResponseCode = (char)Res.ResponseCode[0]; ReceiptInfo.ErrorCode = Res.ErrorCode; if (ReceiptInfo.ResponseCode == 'A') { ReceiptInfo.MerchantID = MerchantID; ReceiptInfo.ClerkID = ClerkID; ReceiptInfo.Balance = (Decimal)Res.Balance; ReceiptInfo.CardNumber = CardNumber; ReceiptInfo.TransactionNumber = (long)Res.TranNumber; ReceiptInfo.TransactionType = "BALANCE INQUIRY"; ReceiptInfo.When = (DateTime)Res.ReceiptTime; ReceiptInfo.LocalTime = LocalTime; } return(ReceiptInfo); }