예제 #1
0
파일: PayService.cs 프로젝트: ghbylmt/LsPay
 public PayResponseModel Pay(byte[] preMsg, string mac)
 {
     try
     {
         IPay PayObj = PaymentPlatFormFactory.GetPayFactory().GetPayObj(new ICCard());
         return(PayObj.Pay(preMsg, mac));
     }
     catch (System.Exception ex)
     {
         //针对农行卡 62 开头的卡假如输入简单密码是
         //调用接口出现超时的情况。
         //进行特殊的处理 返回代码 68 :交易超时,请重试
         var w32ex = ex as Win32Exception;
         if (w32ex == null)
         {
             w32ex = ex.InnerException as Win32Exception;
         }
         if (w32ex != null && w32ex.ErrorCode.Equals(10060))
         {
             return(new PayResponseModel()
             {
                 ResponseCode = "68"
             });
         }
         else
         {
             throw ex;
         }
     }
 }
예제 #2
0
        internal void GetRent(IPay player)
        {
            player.Pay(this.Rent);
            this.Owner.TakePayment(this.Rent);

            string message = string.Format("{0} pay ${1} to {2} from {3} street.", player.Name, this.Rent, this.Owner.Name, this.Name);

            GameMessages.Instance.LastMessage = message;
        }
예제 #3
0
파일: Telefon.cs 프로젝트: XanAlfa/Sinifde2
 public void Increase()
 {
     gg.Pay();
 }
예제 #4
0
 public void IncreaseBalance()
 {
     pay.Pay();
 }
예제 #5
0
 public void IncreaseBalance(int n)
 {
     cPay.Pay(n);
 }
예제 #6
0
 public static object Payer(IPay pay, PosForm pf, string provNum, string provMessage, IHttpContextAccessor access)
 {
     return(pay.Pay(pf, ref provNum, ref provMessage, access));
 }