Fixes bug in CreatePaymentFactory