public static V1.ProcessingResult GetProcessingResult(string error) { //assuming this is called only for V2.CCErrorSource.PaymentGateway V1.ProcessingResult result = new V1.ProcessingResult() { isAuthorized = false, ErrorSource = V1.CCErrors.CCErrorSource.ProcessingCenter, ErrorText = error }; return(result); }
public V1.ProcessingResult DoTransaction(V1.CCTranType aTranType, V1.ProcessingInput inputData) { _plugin.Initialize( _provider.GetProcessingCenterSettingsStorage(), _provider.GetCardDataReader(), _provider.GetCustomerDataReader(), _provider.GetDocDetailsDataReader()); V1.ProcessingResult result = new V1.ProcessingResult(); _plugin.DoTransaction(aTranType, inputData, result); return(result); }
public static V1.ProcessingResult GetProcessingResult(V2.ProcessingResult inputResult) { if (inputResult == null) { throw new ArgumentNullException(nameof(inputResult)); } V1.ProcessingResult result = new V1.ProcessingResult() { AuthorizationNbr = inputResult.AuthorizationNbr, CcvVerificatonStatus = ToV1(inputResult.CcvVerificatonStatus), ExpireAfterDays = inputResult.ExpireAfterDays, isAuthorized = true, PCResponse = inputResult.ResponseText, PCResponseCode = inputResult.ResponseCode, PCResponseReasonCode = inputResult.ResponseReasonCode, PCResponseReasonText = inputResult.ResponseReasonText, PCTranNumber = inputResult.TransactionNumber, ResultFlag = V1.CCResultFlag.None, TranStatus = V1.CCTranStatus.Approved }; return(result); }
public V1.ProcessingResult DoTransaction(V1.CCTranType aTranType, V1.ProcessingInput inputData) { V2SettingsGenerator seetingsGen = new V2SettingsGenerator(_provider); V2.ICCTransactionProcessor processor = _plugin.CreateProcessor <V2.ICCTransactionProcessor>(seetingsGen.GetSettings()); V1.ProcessingResult result = null; if (processor == null) { string errorMessage = PXMessages.LocalizeFormatNoPrefixNLA( Messages.FeatureNotSupportedByProcessing, CCProcessingFeature.Base); result = V1ProcessingDTOGenerator.GetProcessingResult(errorMessage); return(result); } var inputGenerator = new V2ProcessingInputGenerator(_provider); var processingInput = inputGenerator.GetProcessingInput(aTranType, inputData); V2.ProcessingResult v2Result = processor.DoTransaction(processingInput); result = V1ProcessingDTOGenerator.GetProcessingResult(v2Result); return(result); }