示例#1
0
            public string CreateCustomerProfile()
            {
                V2.CustomerData customerData = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader());
                string          result       = V2PluginErrorHandler.ExecuteAndHandleError(() => _processor.CreateCustomerProfile(customerData));

                return(result);
            }
示例#2
0
        public static V2.CustomerData GetCustomerData(V1.ICustomerDataReader customerReader)
        {
            var v2CustomerData = new V2.CustomerData();
            Dictionary <string, string> customerData = new Dictionary <string, string>();

            customerReader.ReadData(customerData);
            string value;

            if (customerData.TryGetValue(customerReader.Key_Customer_CCProcessingID, out value))
            {
                v2CustomerData.CustomerProfileID = value;
            }
            if (customerData.TryGetValue(customerReader.Key_CustomerCD, out value))
            {
                v2CustomerData.CustomerCD = value;
            }
            if (customerData.TryGetValue(customerReader.Key_CustomerName, out value))
            {
                v2CustomerData.CustomerName = value;
            }
            if (customerData.TryGetValue(customerReader.Key_BillContact_Email, out value))
            {
                v2CustomerData.Email = value;
            }

            return(v2CustomerData);
        }
示例#3
0
            public void GetCreateForm()
            {
                var processor = GetProcessor();

                V2.CustomerData customerData = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader());
                var             result       = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetDataForCreateForm(customerData));

                throw new PXPaymentRedirectException(result.Caption, result.Url, result.Token, result.Parameters);
            }
            public void GetManageForm()
            {
                var processor = GetProcessor <V2.ICCHostedFormProcessor>();

                V2.CustomerData   customerData = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader());
                V2.CreditCardData cardData     = V2ProcessingInputGenerator.GetCardData(_provider.GetCardDataReader());
                var result = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetDataForManageForm(customerData, cardData));

                throw new PXPaymentRedirectException(result.Caption, result.Url, result.UseGetMethod, result.Token, result.Parameters)
                      {
                          DisableTopLevelNavigation = result.DisableTopLevelNavigation
                      };
            }