public async Task <string> Deliver(Guid?userID, Order order, string address, string city, string country, string zipCode, string name) { if (Real != null) { var connection = await Real.IsConnected().ConfigureAwait(false); if (connection) { var deliver = await Real.Deliver(userID, order, address, city, country, zipCode, name); return(deliver); } else { ConnectToExternalSystemsException exc = new ConnectToExternalSystemsException("No Connection To external payment system"); Logger.writeError(exc); throw exc; } } return(""); }
public async Task <bool> Cancel(Guid?userID, Order order, string card) { if (Real != null) { var connection = await Real.IsConnected().ConfigureAwait(false); if (connection) { var cancellation = await Real.Cancel(userID, order, card).ConfigureAwait(false); return(cancellation); } else { ConnectToExternalSystemsException exc = new ConnectToExternalSystemsException("No Connection To external payment system"); Logger.writeError(exc); throw exc; } } return(true); }
public async Task <string> Pay(Guid?userID, Order order, string cardNum, string expire, string CCV, string cardOwnerName, string cardOwnerID) { if (Real != null) { var connection = await Real.IsConnected().ConfigureAwait(false); if (connection) { var payment = await Real.Pay(userID, order, cardNum, expire, CCV, cardOwnerName, cardOwnerID).ConfigureAwait(false); return(payment); } else { ConnectToExternalSystemsException exc = new ConnectToExternalSystemsException("No Connection To external payment system"); Logger.writeError(exc); throw exc; } } return(""); }