示例#1
0
        private ICCPaymentProcessing CreateAndInitProcessor(CCProcessingCenter row)
        {
            ICCPaymentProcessing processor = CCPaymentProcessing.CreateCCPaymentProcessorInstance(row);

            if (processor == null)
            {
                throw new PXException(Messages.InstanceOfTheProcessingTypeCanNotBeCreated, row.ProcessingTypeName);
            }
            processor.Initialize(this, null, null);
            return(processor);
        }
        public virtual IEnumerable ImportSettings(PXAdapter adapter)
        {
            CCProcessingCenter row = this.ProcessingCenter.Current;

            if (string.IsNullOrEmpty(row.ProcessingCenterID))
            {
                throw new PXException(string.Format(Messages.ProcessingCenterIDIsRequiredForImport));
            }
            if (string.IsNullOrEmpty(row.ProcessingTypeName))
            {
                throw new PXException(string.Format(Messages.ProcessingObjectTypeIsNotSpecified, row.ProcessingTypeName));
            }

            ICCPaymentProcessing processor = CCPaymentProcessing.CreateCCPaymentProcessorInstance(row);

            if (processor == null)
            {
                throw new PXException(string.Format(Messages.InstanceOfTheProcessingTypeCanNotBeCreated, row.ProcessingTypeName));
            }
            processor.Initialize(this, null, null);
            this.ImportSettingsFromPC(processor);
            return(adapter.Get());
        }