/** * Install a recurring payment. * * @param string $hostedDataId * @param float $amount * @param \DateTime $startDate * @param int $count * @param int $frequency * @param string $period * * @return Response\Order\Sell|Response\Error * @throws \Exception */ public function installRecurringPayment($hostedDataId, $amount, \DateTime $startDate, $count, $frequency, $period) { $service = $this->getService(); $paymentInformation = new Model\RecurringPaymentInformation($startDate, $count, $frequency, $period); $payment = new Model\Payment($hostedDataId, $amount); $recurringPaymentAction = new Request\Action\RecurringPayment\Install($service, $payment, $paymentInformation); return $recurringPaymentAction->install(); }