private void SyncDomainExtensionFields(OrderItem domainItem) { // skip sync when user would like to update name servers only if (rbUpdateNs.Checked) return; // if (ddlTopLevelDoms.SelectedItem.Text == "us") { domainItem["NexusCategory"] = ddlNexusCategory.SelectedValue; domainItem["ApplicationPurpose"] = ddlAppPurpose.SelectedValue; } else if (ddlTopLevelDoms.SelectedItem.Text.EndsWith(".uk")) { domainItem["RegisteredFor"] = txtRegisteredFor.Text.Trim(); domainItem["UK_LegalType"] = ddlUkLegalType.SelectedValue; domainItem["UK_CompanyIdNumber"] = txtCompanyIdNum.Text.Trim(); domainItem["HideWhoisInfo"] = chkHideWhoisInfo.Checked ? "y" : "n"; } else if (ddlTopLevelDoms.SelectedItem.Text.EndsWith("eu")) { domainItem["EU_WhoisPolicy"] = chkDtPolicyAgree.Checked ? "I Agree" : ""; domainItem["EU_AgreeDelete"] = chkDelPolicyAgree.Checked ? "YES" : ""; domainItem["EU_ADRLang"] = ddlEuAdrLang.SelectedValue; } }
public static OrderResult SubmitCustomerOrder(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs) { // return EC.Services.Storefront.SubmitCustomerOrder(contractId, orderItems, extraArgs); }
public int AddServiceInfo(string contractId, string currency, OrderItem orderItem) { return EcommerceProvider.AddHostingPlanSvc(contractId, orderItem.ProductId, orderItem.ItemName, orderItem.BillingCycle, currency); }
public static OrderItem GetHostingPlanItem(int productId, string planName, int cycleId) { OrderItem plan = new OrderItem(); plan.productId = productId; plan.billingCycle = cycleId; plan.itemName = planName; plan.recurring = true; plan.quantity = 1; plan.typeId = Product.HOSTING_PLAN; // return plan; }
public OrderResult SubmitCustomerOrder(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs) { return StorefrontController.SubmitCustomerOrder(contractId, orderItems, extraArgs); }
public static OrderItem GetTopLevelDomainItem(int productId, int cycleId, string itemName) { OrderItem item = new OrderItem(); item.recurring = true; item.typeId = Product.TOP_LEVEL_DOMAIN; item.productId = productId; item.quantity = 1; item.billingCycle = cycleId; item.itemName = itemName; return item; }
public static OrderItem GetHostingAddonItem(int productId, int cycleId, int quantity, string itemName) { OrderItem item = new OrderItem(); item.billingCycle = cycleId; item.recurring = cycleId > 0; item.quantity = quantity; item.productId = productId; item.typeId = Product.HOSTING_ADDON; item.itemName = itemName; return item; }
public int AddServiceInfo(string contractId, string currency, OrderItem orderItem) { string propertyNames = null; string propertyValues = null; // deserialize SecurityUtils.SerializeGenericProfile(ref propertyNames, ref propertyValues, orderItem); // return EcommerceProvider.AddDomainNameSvc(contractId, orderItem.ParentSvcId, orderItem.ProductId, orderItem.ItemName, orderItem.BillingCycle, currency, propertyNames, propertyValues); }
public static OrderResult SubmitCustomerOrder(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs) { // Contract contract = ContractSystem.ContractController.GetContract(contractId); // Impersonate ContractSystem.ContractController.ImpersonateAsContractReseller(contract); // OrderResult oResult = new OrderResult(); // check account SecurityResult sResult = StorehouseController.CheckAccountActive(); // if (!sResult.Success) { // oResult.Succeed = false; // oResult.ResultCode = sResult.ResultCode; // return oResult; } // check order items not empty if (orderItems == null || orderItems.Length == 0) { // oResult.Succeed = false; // oResult.ResultCode = EMPTY_ORDER_ITEMS_CODE; // return oResult; } // ES.TaskManager.StartTask("Storefront", "SUBMIT_CUSTOMER_ORDER"); // try { string currency = StorehouseController.GetBaseCurrency(contract.ResellerId); // ordered services List<int> orderedSvcs = new List<int>(); // build services to be ordered for (int i = 0; i < orderItems.Length; i++) { // OrderItem orderItem = orderItems[i]; // int orderedSvcId = 0; // orderItem.ParentSvcId = (orderItem.ParentIndex > -1) ? orderedSvcs[orderItem.ParentIndex] : orderItem.ParentSvcId; // load svc type ProductType svcType = StorehouseController.GetProductType(orderItem.TypeId); // IServiceProvisioning controller = (IServiceProvisioning)Activator.CreateInstance( Type.GetType(svcType.ProvisioningController)); // add service orderedSvcId = controller.AddServiceInfo(contractId, currency, orderItem); // check service controller result if (orderedSvcId < 1) { // ROLLBACK HERE StorehouseController.BulkServiceDelete(contractId, orderedSvcs.ToArray()); oResult.Succeed = false; oResult.ResultCode = orderedSvcId; return oResult; // EXIT } // orderedSvcs.Add(orderedSvcId); } // build invoice lines List<InvoiceItem> invoiceLines = InvoiceController.CalculateInvoiceLinesForServices(orderedSvcs); // int resultCode = InvoiceController.AddInvoice(contractId, invoiceLines, extraArgs); // ERROR if (resultCode < 1) { // ROLLBACK HERE StorehouseController.BulkServiceDelete(contractId, orderedSvcs.ToArray()); oResult.Succeed = false; oResult.ResultCode = resultCode; return oResult; } // oResult.OrderInvoice = resultCode; // oResult.Succeed = true; } catch (Exception ex) { // oResult.ResultCode = -1; // oResult.Succeed = false; // ES.TaskManager.WriteError(ex); } finally { // ES.TaskManager.CompleteTask(); } // return oResult; }
public int AddServiceInfo(string contractId, string currency, OrderItem orderItem) { // get hosting addon product HostingAddon addon = StorehouseController.GetHostingAddon(SecurityContext.User.UserId, orderItem.ProductId); // uncountable addons always have 1 for quantity int quantity = addon.Countable ? orderItem.Quantity : 1; // add hosting addon return EcommerceProvider.AddHostingAddonSvc(contractId, orderItem.ParentSvcId, orderItem.ProductId, quantity, orderItem.ItemName, orderItem.BillingCycle, currency); }
/// <remarks/> public void SubmitCustomerOrderAsync(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs, object userState) { if ((this.SubmitCustomerOrderOperationCompleted == null)) { this.SubmitCustomerOrderOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSubmitCustomerOrderOperationCompleted); } this.InvokeAsync("SubmitCustomerOrder", new object[] { contractId, orderItems, extraArgs}, this.SubmitCustomerOrderOperationCompleted, userState); }
/// <remarks/> public void SubmitCustomerOrderAsync(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs) { this.SubmitCustomerOrderAsync(contractId, orderItems, extraArgs, null); }
/// <remarks/> public System.IAsyncResult BeginSubmitCustomerOrder(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SubmitCustomerOrder", new object[] { contractId, orderItems, extraArgs}, callback, asyncState); }
public OrderResult SubmitCustomerOrder(string contractId, OrderItem[] orderItems, KeyValueBunch extraArgs) { object[] results = this.Invoke("SubmitCustomerOrder", new object[] { contractId, orderItems, extraArgs}); return ((OrderResult)(results[0])); }