Example #1
0
        public DTO_TPurchaseInfo FormatThorPurchaseResponse(object request, object response)
        {
            DTO_TPurchaseInfo purchaseInfo = new DTO_TPurchaseInfo();

            purchaseInfo.ResponseCode    = ((ThorResponse)response).ResponseCode;
            purchaseInfo.ResponseMessage = ((ThorResponse)response).ResponseDescription;
            ThorPurchase lastPurchase = (ThorPurchase)request;

            purchaseInfo.CardNumber        = lastPurchase.CardNo;
            purchaseInfo.CreditValue       = lastPurchase.CreditValue;
            purchaseInfo.LoyaltyValue      = lastPurchase.LoyaltyValue;
            purchaseInfo.TransactionNumber = lastPurchase.TransactionNo;
            purchaseInfo.TransactionValue  = lastPurchase.TransactionValue;

            return(purchaseInfo);
        }
Example #2
0
 private void TransactionResponseHandler(object request, object response)
 {
     Task.Factory.StartNew(new Action(() =>
     {
         if (request == null)
         {
             throw new Exception("TransactionResponseHandler received a null argument!");
         }
         try
         {
             ThorlinkPurchase thorlinkPurchase = new ThorlinkPurchase();
             if (response != null)
             {
                 _purchaseResponseInfo = thorlinkPurchase.FormatThorPurchaseResponse(request, response);
                 _waitflag             = false;
             }
         }
         catch (Exception ex)
         {
             ServiceLogger.Log("TransactionResponseHandler exception is ---" + ex.Message);
         }
     }));
 }
Example #3
0
 public WCFServiceThorlink()
 {
     _waitflag             = false;
     _response             = new DTO_TMemberInfo();
     _purchaseResponseInfo = new DTO_TPurchaseInfo();
 }
Example #4
0
 private void Reset()
 {
     _response             = new DTO_TMemberInfo();
     _purchaseResponseInfo = new DTO_TPurchaseInfo();
     _waitflag             = true;
 }