Ejemplo n.º 1
0
			$Action = new UpdateDomainContactAction($Domain, $contact_type, $NewContact);
			$result = $Action->Run($_SESSION['userid']);
			if ($result == UpdateDomainContactAction_Result::OK)
			{
				$_SESSION["okmsg"] = _("Contact successfully changed");
				$data = array("domainid" => $req_domainid);
			}
			else if ($result == UpdateDomainContactAction_Result::PENDING)
			{
				$_SESSION["okmsg"] = _("Contact change request has been sent to registry. ") . 
					_("You will be notified by email as soon as this operation will be completed.");
				$data = array("domainid" => $req_domainid);				
			}
			else if ($result == UpdateDomainContactAction_Result::INVOICE_GENERATED)
			{
				$Invoice = $Action->GetInvoice();
				$data = array
				(
					"domainid" => $req_domainid, 
					"checkout_redir" => true, 
					"invoiceid" => $Invoice->ID, 
					"invoice_status" => $Invoice->Status
				);
			}
			$res = true;
		}
		catch (UpdateDomainContactAction_Exception $e)
		{
			$res = false;			
			$data = $e->getMessage();
		}