Ejemplo n.º 1
0
            public void DeletePaymentProfile()
            {
                string customerProfileId = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader()).CustomerProfileID;
                string paymentProfileId  = V2ProcessingInputGenerator.GetCardData(_provider.GetCardDataReader()).PaymentProfileID;

                V2PluginErrorHandler.ExecuteAndHandleError(() => _processor.DeletePaymentProfile(customerProfileId, paymentProfileId));
            }
Ejemplo n.º 2
0
            public string CreateCustomerProfile()
            {
                V2.CustomerData customerData = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader());
                string          result       = V2PluginErrorHandler.ExecuteAndHandleError(() => _processor.CreateCustomerProfile(customerData));

                return(result);
            }
            public IEnumerable <V2.TransactionData> GetUnsettledTransactions(V2.TransactionSearchParams searchParams = null)
            {
                V2.ICCTransactionGetter          processor = GetProcessor <V2.ICCTransactionGetter>();
                IEnumerable <V2.TransactionData> result    = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetUnsettledTransactions(searchParams));

                return(result);
            }
            public IEnumerable <V2.TransactionData> GetTransactionsByCustomer(string customerProfileId, V2.TransactionSearchParams searchParams = null)
            {
                V2.ICCTransactionGetter          processor = GetProcessor <V2.ICCTransactionGetter>();
                IEnumerable <V2.TransactionData> result    = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetTransactionsByCustomer(customerProfileId, searchParams));

                return(result);
            }
Ejemplo n.º 5
0
            public V2.CreditCardData GetPaymentProfile()
            {
                string customerProfileId = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader()).CustomerProfileID;
                string paymentProfileId  = V2ProcessingInputGenerator.GetCardData(_provider.GetCardDataReader()).PaymentProfileID;

                V2.CreditCardData result = V2PluginErrorHandler.ExecuteAndHandleError(() => _processor.GetPaymentProfile(customerProfileId, paymentProfileId));
                return(result);
            }
            public IEnumerable <V2.CreditCardData> GetAllPaymentProfiles()
            {
                V2.ICCProfileProcessor processor       = GetProcessor <V2.ICCProfileProcessor>();
                string customerProfileId               = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader()).CustomerProfileID;
                IEnumerable <V2.CreditCardData> result = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetAllPaymentProfiles(customerProfileId));

                return(result);
            }
Ejemplo n.º 7
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 HostedFormResponse ParsePaymentFormResponse(string response)
            {
                var parser = GetProcessor <V2.ICCHostedPaymentFormResponseParser>();
                var result = V2PluginErrorHandler.ExecuteAndHandleError(() => {
                    return(parser.Parse(response));
                });

                return(V2Converter.ConvertHostedFormResponse(result));
            }
Ejemplo n.º 9
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);
            }
Ejemplo n.º 10
0
            public IEnumerable <V2.CreditCardData> GetMissingPaymentProfiles()
            {
                var    processor         = GetProfileProcessor();
                string customerProfileId = V2ProcessingInputGenerator.GetCustomerData(_provider.GetCustomerDataReader()).CustomerProfileID;
                var    result            = V2PluginErrorHandler
                                           .ExecuteAndHandleError(
                    () => V2.InterfaceExtensions
                    .GetMissingPaymentProfiles(processor, customerProfileId, GetExistingProfiles(_provider)));

                return(result);
            }
            public void GetPaymentForm(V2.ProcessingInput inputData)
            {
                var formProcessor = GetProcessor <V2.ICCHostedPaymentFormProcessor>();
                var result        = V2PluginErrorHandler.ExecuteAndHandleError(() => {
                    CheckWebhook();
                    return(formProcessor.GetDataForPaymentForm(inputData));
                });

                PXTrace.WriteInformation($"Perform PaymentRedirectException. Url: {result.Url}");
                throw new PXPaymentRedirectException(result.Caption, result.Url, result.UseGetMethod, 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
                      };
            }
 public V2.TranProfile GetOrCreatePaymentProfileFromTransaction(string transactionId, V2.CreateTranPaymentProfileParams cParams)
 {
     V2.ICCProfileCreator processor = GetProcessor <V2.ICCProfileCreator>();
     V2.TranProfile       result    = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetOrCreatePaymentProfileFromTransaction(transactionId, cParams));
     return(result);
 }
 public V2.TransactionData GetTransaction(string transactionId)
 {
     V2.ICCTransactionGetter processor = GetProcessor <V2.ICCTransactionGetter>();
     V2.TransactionData      result    = V2PluginErrorHandler.ExecuteAndHandleError(() => processor.GetTransaction(transactionId));
     return(result);
 }
Ejemplo n.º 15
0
            public void DeleteCustomerProfile()
            {
                string customerProfileId = V2ProcessingInputGenerator.GetCustomerData(GetProvider().GetCustomerDataReader()).CustomerProfileID;

                V2PluginErrorHandler.ExecuteAndHandleError(() => GetProcessor().DeleteCustomerProfile(customerProfileId));
            }