move PaymentEngine to a class instead use hash with lambda