diff --git a/addSSLOrder.md b/addSSLOrder.md index 8856efd..2b5364a 100644 --- a/addSSLOrder.md +++ b/addSSLOrder.md @@ -97,4 +97,98 @@ If no errors in request following parameters will be returned: "tax": "0.00", "tax_rate": "21%" } +``` + + +### Example code (Single domain SSL) +```PHP + 66, + "period" => 3, + "csr" => $CSR, + "server_count" => -1, + "webserver_type" => -1, + + // CommonName - Domain Control Validation + "dcv_method" => "email", + "approver_email" => "admin@gogetssl.com", + + // Administrative Person info + 'admin_title' => "Mr.", + 'admin_firstname' => "John", + 'admin_lastname' => "Smith", + 'admin_phone' => "+37166164222", + 'admin_email' => "admin@gogetssl.com", + + // Technical Person info + 'tech_title' => "Mr.", + 'tech_firstname' => "John", + 'tech_lastname' => "Smith", + 'tech_phone' => "+37166164222", + 'tech_email' => "admin@gogetssl.com", +]; + +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL, "https://my.gogetssl.com/api/orders/add_ssl_order?auth_key=YOUR_AUTH_HASH"); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); +curl_setopt($ch, CURLOPT_POST, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, $request); +$response = curl_exec($ch); + +``` + +### Example code (Multi-domain SSL) +```PHP + 68, + "period" => 3, + "csr" => $CSR, + "server_count" => -1, + "webserver_type" => -1, + + // CommonName - Domain Control Validation + "dcv_method" => "email", + "approver_email" => "admin@gogetssl.com", + + // SAN - Domain names (coma separated string) + "dns_names" => implode(",", ["www.gogetssl.com", "my.gogetssl.com", "support.gogetssl.com"]), + // SAN - Domain validation methods (coma separated string) + "approver_emails" => implode(",", ["admin@gogetssl.com", "dns", "http"]), + + // Administrative Person info + 'admin_title' => "Mr.", + 'admin_firstname' => "John", + 'admin_lastname' => "Smith", + 'admin_phone' => "+37166164222", + 'admin_email' => "admin@gogetssl.com", + + // Technical Person info + 'tech_title' => "Mr.", + 'tech_firstname' => "John", + 'tech_lastname' => "Smith", + 'tech_phone' => "+37166164222", + 'tech_email' => "admin@gogetssl.com", +]; + +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL, "https://my.gogetssl.com/api/orders/add_ssl_order?auth_key=YOUR_AUTH_HASH"); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); +curl_setopt($ch, CURLOPT_POST, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, $request); +$response = curl_exec($ch); + ``` \ No newline at end of file