/** * Sends a request to the api for generating a signed document and * signature, both of which will be contained within the returned notary * object. The notary object can then be used for creating a new * subscription. * * @param SubscriptionNotaryArguments $args arguments for generating notary * * @return Notary notary generated from payload * @throws ServiceException if api response isn't successful */ public function getSubscriptionNotary(SubscriptionNotaryArguments $args) { $vars = array('Amount' => $args->getAmount(), 'Category' => $args->getCategory(), 'Channel' => $args->getChannel(), 'Description' => $args->getDescription(), 'MerchantTransactionId' => $args->getMerchantTransactionId(), 'MerchantProductId' => $args->getMerchantProductId(), 'MerchantPaymentRedirectUrl' => $args->getMerchantRedirectUrl(), 'MerchantSubscriptionIdList' => $args->getMerchantSubscriptionIdList(), 'IsPurchaseOnNoActiveSubscription' => $args->isPurchaseOnNoActiveSubscription(), 'SubscriptionRecurrences' => $args->getSubscriptionRecurrences(), 'SubscriptionPeriod' => $args->getSubscriptionPeriod(), 'SubscriptionPeriodAmount' => $args->getSubscriptionPeriodAmount()); $payload = json_encode($vars); return $this->getNotary($payload); }