public string SettleRequest(long saleRefrenceId) { try { string Result = behPardakhtWebService.bpSettleRequest(TerminalID, UserName, Password, OrderID, OrderID, saleRefrenceId); foreach (ResCode resCode in System.Enum.GetValues(typeof(ResCode))) { if (Helper.GetInt(Result) == (int)resCode && resCode != (int)ResCode.TransactionWasSuccessful) { throw new Exception(Language.GetString(resCode.ToString())); } } return(Result); } catch (Exception ex) { throw ex; } }
private string bpSettleRequest(long saleOrderId, long saleReferenceId, string refId, long userId) { userId = 0;//این باید طبق قوانین به پرداخت صفر باشد! string response = ""; long payId = 0; PaymentGatewayImplService bpService = new PaymentGatewayImplService(); try { //درخواست واریز وجه response = bpService.bpSettleRequest(OtherId, behpardakht_username, behpardakht_password, payId, saleOrderId, saleReferenceId); } catch { return("-999");//خطای سیستمی } if (response == "0" || response == "45") { return(response); } else if (string.IsNullOrEmpty(response)) { return("-901");//وضعیت نامشخص } else { return(response); } }