public static Refund Withdraw(this Client customer, PaymillHelper ph, double amount, Payment creditCard = null) { if (creditCard == null) { creditCard = customer.Payment.FirstOrDefault(); } return(ph.CreateRefund(customer, creditCard, PaymillHelper.DoubleToPaymillPrice(amount))); }
public static Transaction Pay(this Client customer, PaymillHelper ph, double amount, Payment creditCard = null) { if (creditCard == null) { creditCard = customer.Payment.FirstOrDefault(); } return(ph.CreateTransaction(customer, creditCard, PaymillHelper.DoubleToPaymillPrice(amount))); }