ExternalId and Paymentgateway changes