public static void CreatePaymentMethodHF <TPaymentMethodType>(PXGraph graph, PXSelectBase <TPaymentMethodType> customerPaymentMethodView, TPaymentMethodType currentCutomerPaymenMethod) where TPaymentMethodType : CustomerPaymentMethod, new() { if (graph == null || customerPaymentMethodView == null || currentCutomerPaymenMethod == null) { return; } CCCustomerInformationManager cim = new CCCustomerInformationManager(currentCutomerPaymenMethod.CCProcessingCenterID, CCProcessingFeature.HostedForm, new ProcessingContext() { aCustomerID = currentCutomerPaymenMethod.BAccountID, aPMInstanceID = currentCutomerPaymenMethod.PMInstanceID, callerGraph = graph }); if (currentCutomerPaymenMethod.CustomerCCPID == null) { string id = cim.CreateCustomer(); TPaymentMethodType cpm = (TPaymentMethodType)customerPaymentMethodView.Cache.CreateCopy(currentCutomerPaymenMethod); cpm.CustomerCCPID = id; customerPaymentMethodView.Update(cpm); } cim.CreatePaymentMethodHostedForm(); }