Rewrite to work with CGPaymentGatewayBase 1.6