eppAddSubscriptions($session_id, $registrar_id, $domain_name, $domain_id, $term, $offer_id, $quantity, $action)
eppAddSubscriptions should be called when a max md reseller needs to purchase offers or products for a given domain. It will eventually create subscriptions in Max MD. A SOAP request can be found using the "eppAddSubscriptionsAPI" method in https://api.max.md.eval.max.md/eppAddSubscriptionsAPI.php?wsdl.
Response
(string) code - A response code. This will be "0" if there is no error
(string) message - A description of the reponse code
(string) values - For future use
Sample Code (using NuSoap)
//Login to acquire a session id
$login_wsdl = "https://api.max.md/login.php?wsdl";
$soap = new soapclient($login_wsdl,array( 'trace' => true, 'exceptions' => true, ));
$response = $soap->login($username, $password);
$session_id = $response->values[0];
//provide your registar id, domain name, domain id, duration of the subscription, offer code, quantity, and action like the following:
/*
$registrar_id = 165;
$domain_name = AAA.MD;
$domain_id = 3567;
$term = 2; //years
$offer_id = 17; //Will be provided in your documentation
$quantity = 1;
$action = "new"; //new | renew
*/
$soap = new soapclient("https://api.max.md.eval.max.md/eppAddSubscriptionsAPI.php?wsdl",array( 'trace' => true, 'exceptions' => true, ));
$response= $soap->eppAddSubscriptions($session_id, $registrar_id, $domain_name, $domain_id, $term, $offer_id, $quantity, $action);
if ($response->code == '0') {
echo $response->message;
}else{
echo $response->message;
}
The xml for the WSDL can be found here
