lib/AmazonSNS.php
public function confirmSubscription($topicArn, $token, $authenticateOnUnsubscribe = null) {
		if(empty($topicArn) || empty($token)) {
			throw new InvalidArgumentException('Must supply a TopicARN and a Token to confirm subscription');
		}

		$params = array(
			'TopicArn' => $topicArn,
			'Token' => $token
		);

		if(!is_null($authenticateOnUnsubscribe)) {
			$params['AuthenticateOnUnsubscribe'] = $authenticateOnUnsubscribe;
		}

		$resultXml = $this->_request('ConfirmSubscription', $params);

		return strval($resultXml->ConfirmSubscriptionResult->SubscriptionArn);
	}
public function confirmSubscription($topicArn, $token, $authenticateOnUnsubscribe = null) {
		if(empty($topicArn) || empty($token)) {
			throw new InvalidArgumentException('Must supply a TopicARN and a Token to confirm subscription');
		}

		$params = array(
			'TopicArn' => $topicArn,
			'Token' => $token
		);

		if(!is_null($authenticateOnUnsubscribe)) {
			$params['AuthenticateOnUnsubscribe'] = $authenticateOnUnsubscribe;
		}

		$resultXml = $this->_request('ConfirmSubscription', $params);

		return strval($resultXml->ConfirmSubscriptionResult->SubscriptionArn);
	}
Confirm a subscription to a topic

@link http://docs.amazonwebservices.com/sns/latest/api/API_ConfirmSubscription.html
@param string $topicArn
@param string $token
@param bool|null $authenticateOnUnsubscribe [optional]
@return string - SubscriptionARN
@throws InvalidArgumentException