Refactoring payment_gateways