public static bool ExDebit(ChargingTransactionInfo info, string content) { bool success = false; try { var wsCgw = new WS_VNMCGW2G.WebServiceCharging3g(); log.Info("2G Call Deduct method: " + info.UserId + " | " + info.ServiceId); string resp = wsCgw.PaymentVnm(info.UserId, info.ServiceId, content, "Wap VNM"); log.Info("2G Ket qua tra ve: " + resp); if (resp == "1") { success = true; } return(success); } catch (Exception ex) { //throw ex; log.Info("2G Error: " + ex.Message); log.Info(" "); log.Info(" "); return(false); } }
public static string ExDebitNew(ChargingTransactionInfo info, string content) { string success = "-1"; try { var wsCgw = new WS_VNMCGW2G.WebServiceCharging3g(); log.Info("2G Call Deduct method: " + info.UserId + " | " + info.ServiceId); string resp = wsCgw.PaymentVnm(info.UserId, info.ServiceId, content, "Wap VNM"); log.Info("2G Ket qua tra ve: " + resp); if (resp == "1") { return(success = "1"); } //if (resp == "Result:12,Detail:Not enough money.") //{ // return success = "12"; //} //if (resp == "Result:4,Detail:System overload") //{ // return success = "4"; //} return(resp); } catch (Exception ex) { //throw ex; log.Info("2G Error: " + ex.Message); log.Info(" "); log.Info(" "); return(success); } }