Beispiel #1
0
 public TodoPagoPaymentProcessor(ISettingService settingService,
                                 ICurrencyService currencyService,
                                 ICustomerService customerService,
                                 IWebHelper webHelper,
                                 IOrderTotalCalculationService orderTotalCalculationService,
                                 IEncryptionService encryptionService,
                                 CurrencySettings currencySettings,
                                 TodoPagoPaymentSettings todoPagoPaymentSettings,
                                 TodoPagoTransactionObjectContex contex,
                                 TodoPagoAddressBookObjectContex contexAddressBook,
                                 HttpContextBase httpContext,
                                 ILogger logger,
                                 IOrderService orderService,
                                 ITodoPagoTransactionService todoPagoTransactionService,
                                 ITodoPagoAddressBookService todoPagoAddressBookService)
 {
     this._todoPagoPaymentSettings = todoPagoPaymentSettings;
     this._settingService          = settingService;
     this._currencyService         = currencyService;
     this._customerService         = customerService;
     this._currencySettings        = currencySettings;
     this._webHelper = webHelper;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._encryptionService            = encryptionService;
     this._contex                 = contex;
     this._contexAddressBook      = contexAddressBook;
     this._httpContext            = httpContext;
     this._logger                 = logger;
     this._orderService           = orderService;
     this.todoPagoBusinessService = new TodoPagoBusinessService(todoPagoTransactionService, todoPagoAddressBookService);
 }
Beispiel #2
0
        public override void Install()
        {
            //settings
            var settings = new TodoPagoPaymentSettings
            {
                //Configuracion general
                Titulo      = "TodoPago",
                Descripcion = "Pague de manera segura mediante TodoPago, solo para republica argentina",
                Ambiente    = Ambiente.Developers,
                Segmento    = Segmento.Retail,
                //DeadLine = "",
                //Formulario = Formulario.Externo,
                SetCuotas = false,
                MaxCuotas = MaxCuotas.Doce,
                Chart     = true,

                User     = "",
                Password = "",

                //Ambiente Developer
                ApiKeyDeveloper   = "",
                SecurityDeveloper = "",
                MerchantDeveloper = "",

                //Ambiente Production
                ApiKeyProduction   = "",
                SecurityProduction = "",
                MerchantProduction = "",

                //Estdos del pedido
                TransaccionIniciada  = OrderStatus.Pending,
                TransaccionAprobada  = OrderStatus.Complete,
                TransaccionRechazada = OrderStatus.Cancelled,
                TransaccionOffline   = OrderStatus.Processing
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Notes", "Descripcion de Todo Pago");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Titulo", "Titulo");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Titulo.Hint", "Titulo que el usuario ve durante el checkout.");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Descripcion", "Descripcion");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Descripcion.Hint", "Descripcion que el usuario ve durante el checkout.");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.AmbienteValues", "Ambiente");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.AmbienteValues.Hint", "Seleccione el ambiente con el que desea trabajar.");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SegmentoValues", "Tipo de segmento");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SegmentoValues.Hint", "Seleccione el tipo de segmento con el que desea trabajar.");

            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.DeadLine", "DeadLine");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.DeadLine.Hint", "Dias maximos para la entrega.");

            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.FormularioValues", "Elija el formulario que desea utilizar");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.FormularioValues.Hint", "Puede esscojer entre un formulario integrado al comercio o redireccionar al formulario externo");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SetCuotas", "Habilitar/Desabilitar cantidad de cuotas");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SetCuotas.Hint", "Habilita el ingreso de la cantidad de cuotas maxima ofrecida");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.MaxCuotasValues", "Numero maximo de cuotas");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.MaxCuotasValues.Hint", "Puede escojer entre 1 o 12 cuotas");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SetTimeout", "Habilitar/Desabilitar timeout");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SetTimeout.Hint", "Habilita el ingreso del timeout");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Timeout", "Tiempo maximo en milisegundos para realizar el pago en el formulario (300000 a 21600000)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Timeout.Hint", "Los valores posibles van de 300000 (5 minutos) a 21600000 (6hs) en milisegundos. En caso de que no se envíe el parámetro el valor por defecto es 1800000 (30 minutos).");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Chart", "¿Desea vaciar carrito de compras al fallar el pago?");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Chart.Hint", "Si falla el pago, vacía el carrito de compras");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.GoogleMaps", "¿Desea validar la dirección de compra con Google Maps?");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.GoogleMaps.Hint", "Verifica la dirección con Google");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Hibrido", "¿Desea utilizar el formulario híbrido?");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Hibrido.Hint", "Verifica la dirección con Google");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.UrlBannerBilletera", "UrlBannerBilletera");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.UrlBannerBilletera.Hint", "Url del banner a mostrar en billetera.");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.User", "User");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.User.Hint", "User de Todo Pago.");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Password", "Password");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Password.Hint", "Password de Todo Pago.");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.BtnCredentials", "Obtener Credenciales");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ApiKeyDeveloper", "HTTP Header");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ApiKeyDeveloper.Hint", "Authorization para el header. Ejemplo: PRISMA 2894UK59JD6SKL56J40O487EH3KW8943");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SecurityDeveloper", "Security");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SecurityDeveloper.Hint", "Codigo provisto por Todo Pago");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.MerchantDeveloper", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.MerchantDeveloper.Hint", "Numero de comercio provisto por Todo Pago");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ApiKeyProduction", "HTTP Header");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ApiKeyProduction.Hint", "Authorization para el header. Ejemplo: PRISMA 2894UK59JD6SKL56J40O487EH3KW8943");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SecurityProduction", "Security");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.SecurityProduction.Hint", "Codigo provisto por Todo Pago");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.MerchantProduction", "Merchant ID");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.MerchantProduction.Hint", "Numero de comercio provisto por Todo Pago");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionIniciadaValues", "Estado cuando la transaccion ha sido iniciada");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionIniciadaValues.Hint", "Valor por defecto: Pendiente");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionAprobadaValues", "Estado cuando la transaccion ha sido Aprobada");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionAprobadaValues.Hint", "Valor por defecto: Completado");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionRechazadaValues", "Estado cuando la transaccion ha sido Rechazada");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionRechazadaValues.Hint", "Valor por defecto: Fallido");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionOfflineValues", "Estado cuando la transaccion ha sido Offline");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TransaccionOfflineValues.Hint", "Valor por defecto: Pendiente");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.RedirectionTip", "Todo Pago va a redireccionar al formulario de pago.");

            //Status Fields
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.OrderStatus", "Estado de la Transaccion");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ResultMessage", "Mensaje de la Transaccion");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Close", "Cerrar");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ResultCode", "ResultCode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.DateTime", "DateTime");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.OperationId", "OperationId");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CurrencyCode", "CurrencyCode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Amount", "Amount");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Type", "Type");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.InstallmentPayments", "InstallmentPayments");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CustomerEmail", "CustomerEmail");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.IdentificationType", "IdentificationType");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Identification", "Identification");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CardNumber", "CardNumber");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CardHolderName", "CardHolderName");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TicketNumber", "TicketNumber");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.AuthorizationCode", "AuthorizationCode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.BarCode", "BarCode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CouponExpDate", "CouponExpDate");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CouponSecexpDate", "CouponSecexpDate");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CouponSubscriber", "CouponSubscriber");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.BankId", "BankId");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PaymentMethodType", "PaymentMethodType");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PaymentMethodCode", "PaymentMethodCode");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PromotionId", "PromotionId");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.AmountBuyer", "AmountBuyer");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PaymentMethodName", "PaymentMethodName");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PushNotifyEndpoint", "PushNotifyEndpoint");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PushNotifyMethod", "PushNotifyMethod");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PushNotifyStates", "PushNotifyStates");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Refunded", "Refunded");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Refunds", "Refunds");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.FeeAmount", "FeeAmount");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TaxAmount", "TaxAmount");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ServiceChargeAmount", "ServiceChargeAmount");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CreditedAmount", "CreditedAmount");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.FeeAmountBuyer", "FeeAmountBuyer");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TaxAmountBuyer", "TaxAmountBuyer");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CreditedAmountBuyer", "CreditedAmountBuyer");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.EstadoContraCargo", "EstadoContraCargo");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Comision", "Comision");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.IdContracargo", "IdContracargo");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.FechaNotificacionCuenta", "FechaNotificacionCuenta");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TEA", "TEA");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CFT", "CFT");

            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.RELEASESTATUS", "RELEASESTATUS");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.RELEASEDATETIME", "RELEASEDATETIME");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PHONENUMBER", "PHONENUMBER");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.ADDRESS", "ADDRESS");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.POSTALCODE", "POSTALCODE");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.CUSTOMERID", "CUSTOMERID");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PRODUCTCODE", "PRODUCTCODE");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PRODUCTDESCRIPTION", "PRODUCTDESCRIPTION");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PRODUCTNAME", "PRODUCTNAME");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.QUANTITY", "QUANTITY");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.PRODUCTSKU", "PRODUCTSKU");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.UNITPRICE", "UNITPRICE");
            //this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.TOTALAMOUNT", "TOTALAMOUNT");
            this.AddOrUpdatePluginLocaleResource("Plugins.Payments.TodoPago.Fields.Items", "Items");

            _contex.Install();
            base.Install();
        }