protected CCCustomerInformationManager(string processingCenterID, CCProcessingFeature feature)
        {
            _feature    = feature;
            _context    = new CCProcessingContext();
            _repository = CCPaymentProcessingRepository.GetCCPaymentProcessingRepository();
            CCProcessingCenter processingCenter = _repository.GetCCProcessingCenter(processingCenterID);

            CCProcessingFeatureHelper.CheckProcessing(processingCenter, _feature, _context);
            _pluginObject = InitializePlugin(_repository.GetCCProcessingCenter(processingCenterID));
        }
        public virtual IList <ISettingsDetail> ExportSettings(PXGraph callerGraph, string processingCenterID)
        {
            CCProcessingContext context = new CCProcessingContext()
            {
                callerGraph = callerGraph
            };
            CCProcessingCenter processingCenter = _repository.GetCCProcessingCenter(processingCenterID);

            CCProcessingFeatureHelper.CheckProcessing(processingCenter, CCProcessingFeature.Base, context);
            if (context.processingCenter == null)
            {
                throw new PXException(Messages.ERR_CCProcessingCenterNotFound);
            }
            var processor = GetProcessingWrapper(context);
            List <ISettingsDetail> processorSettings = new List <ISettingsDetail>();

            processor.ExportSettings(processorSettings);
            return(processorSettings);
        }
        public virtual bool TestCredentials(PXGraph callerGraph, string processingCenterID)
        {
            CCProcessingContext context = new CCProcessingContext()
            {
                callerGraph = callerGraph
            };
            CCProcessingCenter processingCenter = _repository.GetCCProcessingCenter(processingCenterID);

            CCProcessingFeatureHelper.CheckProcessing(processingCenter, CCProcessingFeature.Base, context);
            if (context.processingCenter == null)
            {
                throw new PXException(Messages.ERR_CCProcessingCenterNotFound);
            }
            var         processor   = GetProcessingWrapper(context);
            APIResponse apiResponse = new APIResponse();

            processor.TestCredentials(apiResponse);
            ProcessAPIResponse(apiResponse);
            return(apiResponse.isSucess);
        }
        public virtual void ValidateSettings(PXGraph callerGraph, string processingCenterID, ISettingsDetail settingDetail)
        {
            CCProcessingContext context = new CCProcessingContext()
            {
                callerGraph = callerGraph
            };
            CCProcessingCenter processingCenter = _repository.GetCCProcessingCenter(processingCenterID);

            CCProcessingFeatureHelper.CheckProcessing(processingCenter, CCProcessingFeature.Base, context);
            if (context.processingCenter == null)
            {
                throw new PXException(Messages.ERR_CCProcessingCenterNotFound);
            }
            var      processor = GetProcessingWrapper(context);
            CCErrors result    = processor.ValidateSettings(settingDetail);

            if (result.source != CCErrors.CCErrorSource.None)
            {
                throw new PXSetPropertyException(result.ErrorMessage, PXErrorLevel.Error);
            }
        }