public static void Add(int userId, Money amount, PaymentType type, PaymentProcessor processor, string processorName = "") { var proof = new PaymentProof(); proof.Type = type; proof.Amount = amount; proof.Date = DateTime.Now; proof.UserId = userId; proof.Processor = processor; proof.ProcessorName = processorName; proof.Save(); //Sending Payout Confirmation, Fired for all PP, BTC, CommissionPayout try { var user = new Member(userId); if (AppSettings.Emails.PayoutEmailMessageEnabled) { Mailer.SendPayoutConfirmationMessage(user.Name, amount, user.Email); } } catch (Exception ex) { ErrorLogger.Log(ex); } }
public static void Add(Member User, PayoutRequest request, PaymentType PaymentTypeT = PaymentType.Manual) { //Add payment proof if (request.PaymentProcessor == "PayPal") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.PayPal); } else if (request.PaymentProcessor == "Payza") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.Payza); } else if (request.PaymentProcessor == "PerfectMoney") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.PerfectMoney); } else if (request.PaymentProcessor == "OKPay") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.OKPay); } else if (request.PaymentProcessor == "EgoPay") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.EgoPay); } else if (request.PaymentProcessor == "Neteller") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.Neteller); } else if (request.PaymentProcessor == "SolidTrustPay") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.SolidTrustPay); } else if (request.PaymentProcessor == "Payeer") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.Payeer); } else if (request.PaymentProcessor == "Papara") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.Papara); } else if (request.PaymentProcessor == "MPesa") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.MPesa); } else if (request.PaymentProcessor == "MPesaAgent") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.MPesaAgent); } else if (request.PaymentProcessor == "LocalBitcoins") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.LocalBitcoins); } else if (request.PaymentProcessor == "Revolut") { PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.Revolut); } else { //Custom PP PaymentProof.Add(User.Id, request.Amount, PaymentTypeT, PaymentProcessor.CustomPayoutProcessor, request.PaymentProcessor); } }