public override string ProcessCommand(string paramCmd, HttpContext context, string editlang = "") { var ajaxInfo = NBrightBuyUtils.GetAjaxFields(context); var lang = NBrightBuyUtils.SetContextLangauge(ajaxInfo); // Ajax breaks context with DNN, so reset the context language to match the client. var objCtrl = new NBrightBuyController(); var strOut = "OS_PaymentGateway Ajax Error"; // NOTE: The paramCmd MUST start with the plugin ref. in lowercase. (links ajax provider to cmd) switch (paramCmd) { case "os_paymentgateway_savesettings": strOut = objCtrl.SavePluginSinglePageData(context); break; case "os_paymentgateway_selectlang": objCtrl.SavePluginSinglePageData(context); var nextlang = ajaxInfo.GetXmlProperty("genxml/hidden/nextlang"); var info = objCtrl.GetPluginSinglePageData("OS_PaymentGatewaypayment", "OS_PaymentGatewayPAYMENT", nextlang); strOut = NBrightBuyUtils.RazorTemplRender("settingsfields.cshtml", 0, "", info, "/DesktopModules/NBright/OS_PaymentGateway", "config", nextlang, StoreSettings.Current.Settings()); break; } return(strOut); }
public override string ProcessCommand(string paramCmd, HttpContext context, string editlang = "") { var ajaxInfo = NBrightBuyUtils.GetAjaxFields(context); var lang = NBrightBuyUtils.SetContextLangauge(ajaxInfo); // Ajax breaks context with DNN, so reset the context language to match the client. var objCtrl = new NBrightBuyController(); var strOut = "manualpayment Ajax Error"; if (PluginUtils.CheckPluginSecurity(PortalSettings.Current.PortalId, "manualpayment")) { switch (paramCmd) { case "manualpayment_savesettings": strOut = objCtrl.SavePluginSinglePageData(context); break; case "manualpayment_selectlang": objCtrl.SavePluginSinglePageData(context); var nextlang = ajaxInfo.GetXmlProperty("genxml/hidden/nextlang"); var info = objCtrl.GetPluginSinglePageData("manualpayment", "MANUALPAYMENT", nextlang); strOut = NBrightBuyUtils.RazorTemplRender("settingsfields.cshtml", 0, "", info, "/DesktopModules/NBright/NBrightBuy/Providers/ManualPaymentProvider", "config", nextlang, StoreSettings.Current.Settings()); break; } } return(strOut); }
public override string ProcessCommand(string paramCmd, HttpContext context, string editlang = "") { var ajaxInfo = NBrightBuyUtils.GetAjaxFields(context); var lang = NBrightBuyUtils.SetContextLangauge(ajaxInfo); // Ajax breaks context with DNN, so reset the context language to match the client. var objCtrl = new NBrightBuyController(); var strOut = "OS_AllShipping Error"; switch (paramCmd) { case "os_allshipping_getsettings": var info1 = objCtrl.GetPluginSinglePageData("OS_AllShipping", "SHIPPING", lang); strOut = NBrightBuyUtils.RazorTemplRender("settingsfields.cshtml", 0, "", info1, "/DesktopModules/NBright/OS_AllShipping", "config", lang, StoreSettings.Current.Settings()); break; case "os_allshipping_savesettings": strOut = objCtrl.SavePluginSinglePageData(context); break; case "os_allshipping_selectlang": objCtrl.SavePluginSinglePageData(context); var nextlang = ajaxInfo.GetXmlProperty("genxml/hidden/nextlang"); var info2 = objCtrl.GetPluginSinglePageData("OS_AllShipping", "SHIPPING", nextlang); strOut = NBrightBuyUtils.RazorTemplRender("settingsfields.cshtml", 0, "", info2, "/DesktopModules/NBright/OS_AllShipping", "config", nextlang, StoreSettings.Current.Settings()); break; case "os_allshipping_getcarttotals": var cartd = new CartData(PortalSettings.Current.PortalId); cartd.PurchaseInfo.SetXmlProperty("genxml/OS_AllShippingmessage", ""); cartd.PurchaseInfo.SetXmlProperty("genxml/OS_AllShippinglistidx", ajaxInfo.GetXmlProperty("genxml/radiobuttonlist/list")); cartd.PurchaseInfo.SetXmlProperty("genxml/OS_AllShippinglistcode", ""); cartd.PurchaseInfo.SetXmlProperty("genxml/OS_AllShippingaddress", ""); cartd.Save(); strOut = NBrightBuyUtils.RazorTemplRender("CheckoutTotals.cshtml", 0, "", cartd, "/DesktopModules/NBright/NBrightBuy", "Default", Utils.GetCurrentCulture(), StoreSettings.Current.Settings()); break; case "os_allshipping_getlist": strOut = OrderAdminList(context); break; } return(strOut); }
public override string ProcessCommand(string paramCmd, HttpContext context, string editlang = "") { if (!LocalUtils.CheckRights()) { return("Security Error."); } var ajaxInfo = NBrightBuyUtils.GetAjaxFields(context); var lang = NBrightBuyUtils.SetContextLangauge(ajaxInfo); // Ajax breaks context with DNN, so reset the context language to match the client. var objCtrl = new NBrightBuyController(); var strOut = "OS_PurchaseNotification Ajax Error"; // NOTE: The paramCmd MUST start with the plugin ref. in lowercase. (links ajax provider to cmd) switch (paramCmd) { case "os_purchasenotification_getdata": strOut = LocalUtils.GetData(editlang, "datafields.cshtml"); break; case "os_purchasenotification_deleterecord": var infoDel = objCtrl.GetPluginSinglePageData("OS_PurchaseNotificationDATA", "OS_PurchaseNotificationDATA", Utils.GetCurrentCulture()); objCtrl.Delete(infoDel.ItemID); break; case "os_purchasenotification_savedata": strOut = objCtrl.SavePluginSinglePageData(context); break; case "os_purchasenotification_selectlang": objCtrl.SavePluginSinglePageData(context); strOut = ""; break; case "os_purchasenotification_testemail": LocalUtils.OutputTestEmail(); strOut = LocalUtils.GetData(editlang, "datafields.cshtml"); break; } return(strOut); }