示例#1
0
        public virtual IEnumerable TestCredentials(PXAdapter adapter)
        {
            CCProcessingCenter row = this.ProcessingCenter.Current;

            if (string.IsNullOrEmpty(row.ProcessingCenterID))
            {
                throw new PXException(Messages.ProcessingCenterNotSelected);
            }
            if (string.IsNullOrEmpty(row.ProcessingTypeName))
            {
                throw new PXException(Messages.ProcessingPluginNotSelected);
            }
            CCPaymentProcessing paymentProcessing = PXGraph.CreateInstance <CCPaymentProcessing>();

            if (paymentProcessing.TestCredentials(this, row.ProcessingCenterID))
            {
                ProcessingCenter.Ask(Messages.Result, Messages.CredentialsAccepted, MessageButtons.OK);
            }
            return(adapter.Get());
        }
        public virtual IEnumerable TestCredentials(PXAdapter adapter)
        {
            CCProcessingCenter row = this.ProcessingCenter.Current;

            if (string.IsNullOrEmpty(row.ProcessingCenterID))
            {
                throw new PXException("Processing Center is not selected!");
            }
            if (string.IsNullOrEmpty(row.ProcessingTypeName))
            {
                throw new PXException("Processing plugin is not selected!");
            }
            CCPaymentProcessing paymentProcessing = PXGraph.CreateInstance <CCPaymentProcessing>();

            if (paymentProcessing.TestCredentials(this, row.ProcessingCenterID))
            {
                ProcessingCenter.Ask("Result", "Credentials were accepted by processing center!", MessageButtons.OK);
            }
            return(adapter.Get());
        }