Exemple #1
0
 /// <remarks/>
 public void OrderDomainsAsync(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID, object userState) {
     if ((this.OrderDomainsOperationCompleted == null)) {
         this.OrderDomainsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOrderDomainsOperationCompleted);
     }
     this.InvokeAsync("OrderDomains", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 dbpItems,
                 sROID}, this.OrderDomainsOperationCompleted, userState);
 }
Exemple #2
0
 public string OrderDomains(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID) {
     object[] results = this.Invoke("OrderDomains", new object[] {
                 sCLTRID,
                 credential,
                 shopper,
                 items,
                 dbpItems,
                 sROID});
     return ((string)(results[0]));
 }
Exemple #3
0
 /// <remarks/>
 public void OrderDomainsAsync(string sCLTRID, Credential credential, Shopper shopper, DomainRegistration[] items, DomainByProxy[] dbpItems, string sROID) {
     this.OrderDomainsAsync(sCLTRID, credential, shopper, items, dbpItems, sROID, null);
 }
		private void Register()
		{
			ContactInfo registrant = new ContactInfo()
			{
				fname = "Artemus",
				lname = "Gordon",
				email = "*****@*****.**",
				phone = "+1.8885551212",
				sa1 = "2 N. Main St.",
				city = "Valdosta",
				sp = "Georgia",
				pc = "17123",
				cc = "United States",
			};

			DomainRegistration[] drArray = new DomainRegistration[this.domainNames.Length];
			for (int i = 0; i < this.domainNames.Length; i++)
			{
				string topLevelDomain = Helpers.GetTopLevelDomain(this.domainNames[i]);
				drArray[i] = new DomainRegistration()
				{
					nsArray = new NS[] { new NS() { name = "ns1.example.com" }, new NS() { name = "ns2.example.com" } },
					registrant = registrant,
					order = new OrderItem() { productid = (int)GetProductID(topLevelDomain, RegistrationPeriodInYears, false), riid = i.ToString() },
					tld = topLevelDomain,
					sld = Helpers.GetSecondLevelDomain(this.domainNames[i]),
					period = RegistrationPeriodInYears
				};

				if (topLevelDomain == "us")
				{
					drArray[i].nexus = new Nexus()
					{
						category = "citizen of US",
						use = "personal",
						country = "us"
					};
				}
			}

			Shopper shopper = new Shopper();
			if (this.userID > 0)
			{
				shopper.user = userID.ToString();
			}
			else
			{
				shopper.user = "******";
				shopper.pwd = "abcde";
				shopper.email = "*****@*****.**";
				shopper.firstname = "Artemus";
				shopper.lastname = "Gordon";
				shopper.phone = "+1.8885551212"; // country code . number
			}

			string returnXml = wapi.OrderDomains(orderDomainTransactionID, cred, shopper, drArray, null, "domain");
			RegisterDomainsResponse r = new RegisterDomainsResponse(returnXml);
			if (this.orderDomainTransactionID != r.UniqueClientTransactionID) throw new InvalidResponseException(returnXml);
			this.OrderID = r.OrderID;
			this.userID = r.ShopperID;
		}