Exemple #1
0
            public string CreatePaymentProfile()
            {
                string customerProfileId = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader()).CustomerProfileID;

                V2.CreditCardData cardData    = V2ProcessingInputGenerator.GetCardData(_provider.GetCardDataReader(), _provider.GetExpirationDateConverter());
                V2.AddressData    addressData = V2ProcessingInputGenerator.GetAddressData(_provider.GetCustomerDataReader());
                cardData.AddressData = addressData;
                string result = V2PluginErrorHandler.ExecuteAndHandleError(() => _processor.CreatePaymentProfile(customerProfileId, cardData));

                return(result);
            }
            public void GetCreateForm()
            {
                var processor = GetProcessor <V2.ICCHostedFormProcessor>();

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

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