public TpayPaymentManager(TpayPaymentSettings tPayPaymentSettings, IWebHelper webHelper, IWorkContext workContext, IStoreContext storeContext) { paymentSettings = tPayPaymentSettings; client = new RestClient($"https://secure.tpay.com/api/gw/{paymentSettings.ApiKey}/transaction"); this.webHelper = webHelper; this.workContext = workContext; this.storeContext = storeContext; }
public TpayPaymentController(ISettingService settingService, IPaymentService paymentService, IOrderService orderService, IOrderProcessingService orderProcessingService, TpayPaymentSettings tPayPaymentSettings, PaymentSettings paymentSettings) { this.settingService = settingService; this.paymentService = paymentService; this.orderService = orderService; this.orderProcessingService = orderProcessingService; this.tPayPaymentSettings = tPayPaymentSettings; this.paymentSettings = paymentSettings; availableIPsTable = String.IsNullOrEmpty(tPayPaymentSettings.TPayNotifierIPs) ? new HashSet <string>() : new HashSet <string>(tPayPaymentSettings.TPayNotifierIPs.Split(',')); }