public static IHostedPaymentFormProcessingWrapper GetPaymentFormProcessingWrapper(object pluginObject, ICardProcessingReadersProvider provider, CCProcessingContext context) { CCProcessingHelper.CheckHttpsConnection(); var isV1Interface = CCProcessingHelper.IsV1ProcessingInterface(pluginObject.GetType()); if (isV1Interface) { throw new PXException(Messages.TryingToUseNotSupportedPlugin); } var v2ProcessingInterface = CCProcessingHelper.IsV2ProcessingInterface(pluginObject); if (v2ProcessingInterface != null) { V2HostedFormProcessor wrapper = new V2HostedFormProcessor(v2ProcessingInterface); wrapper.ProcessingCenterId = context?.processingCenter.ProcessingCenterID; wrapper.CompanyName = context?.callerGraph.Accessinfo.CompanyName; ISetCardProcessingReadersProvider setProviderBehaviour = wrapper as ISetCardProcessingReadersProvider; if (setProviderBehaviour == null) { throw new PXException(NotLocalizableMessages.ERR_CardProcessingReadersProviderSetting); } setProviderBehaviour.SetProvider(provider); return(wrapper); } throw new PXException(V1.Messages.UnknownPluginType, pluginObject.GetType().Name); }
private static ICardTransactionProcessingWrapper GetTransactionProcessingWrapper(object pluginObject) { bool isV1Interface = CCProcessingHelper.IsV1ProcessingInterface(pluginObject.GetType()); if (isV1Interface) { throw new PXException(Messages.TryingToUseNotSupportedPlugin); } var v2ProcessingInterface = CCProcessingHelper.IsV2ProcessingInterface(pluginObject); if (v2ProcessingInterface != null) { return(new V2CardTransactionProcessor(v2ProcessingInterface)); } throw new PXException(V1.Messages.UnknownPluginType, pluginObject.GetType().Name); }
private static IExtendedProfileProcessingWrapper GetExtendedProfileProcessingWrapper(object pluginObject) { CCProcessingHelper.CheckHttpsConnection(); bool isV1Interface = CCProcessingHelper.IsV1ProcessingInterface(pluginObject.GetType()); if (isV1Interface) { throw new PXException(Messages.TryingToUseNotSupportedPlugin); } var v2ProcessingInterface = CCProcessingHelper.IsV2ProcessingInterface(pluginObject); if (v2ProcessingInterface != null) { return(new V2ExtendedProfileProcessor(v2ProcessingInterface)); } throw new PXException(V1.Messages.UnknownPluginType, pluginObject.GetType().Name); }