Cancel subscription pause
Overview
Use the cancelRenwalPause method to cancel a subscription's pause and change its status.
Request Parameters
Parameters | Required | Type/Description |
---|---|---|
merchantCode | Required | String. Unique merchant ID code that can be found in the Merchant Control Panel. |
SubscriptionRef | Required | String. The system-generated reference code of the subscription. |
Request Example
<?php $sb = "58"; $vers = "6.0"; $client = new SoapClient("http://api.sandbox" . $sb . ".avangate.local/soap/$vers/?wsdl", array( 'location' => "http://api.sandbox" . $sb . ".avangate.local/soap/$vers/", 'cache_wsdl' => WSDL_CACHE_NONE, "trace" => 1)); $date = gmdate('Y-m-d H:i:s'); $merchantCode = "666999"; $key = "%y~8|m]T84p[W4+O1]_?"; $string = strlen($merchantCode) . $merchantCode . strlen($date) . $date; $hash = hash_hmac('md5', $string, $key); $sessionID = $client->login($merchantCode, $date, $hash); var_dump("session: ", $sessionID); //$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM'); $SubRef = "B7D8E72224"; try { $cancelremvoePause = $client->cancelRenewalPause($sessionID, $SubRef); var_dump("cancelRenewalPause:", $cancelremvoePause); } catch (SoapFault $e) { echo "Error cancelRenewalPause: " . $e->getMessage(); } /* try { $renewalPause = $client->getRenewalPause($sessionID, $SubRef); var_dump("getRenewalPause:", $renewalPause); } catch (SoapFault $e) { echo "Error getRenewalPause: " . $e->getMessage(); } */ exit;
Response Parameters
Parameters | Type/Description |
---|---|
SubscriptionRef |
Boolean
|
Response Example
{ “StartDate”: “2020-02-19 22:20:30", “ResumeDate”: “2020-03-01 18:00:00", “PauseReason”: “vacation leave” }