move payment engine to class instead use lambda and hashes