pub trait PaymentProcessor {
// Required method
fn calculate_payments(
&self,
time_since_ready: i64,
balance_change: i64,
forgo_commission: bool,
) -> PaymentDetails;
// Provided methods
fn should_pay(&self, balance_change: i64) -> bool { ... }
fn calculate_reimbursement(&self, balance_change: i64) -> u64 { ... }
}Expand description
Trait for processing payments