getFirst() === $nextInstallment->getFirst() || !$firstInstallment->getFirst()) { throw new Exception('You must define a installment object for the first payment and next payments'); } $firstInstallment->setDelayTS(); $nextInstallment->setDelayTS($firstInstallment->getDelayTS()); try { parent::__construct($paymentParams, array($firstOrder, $nextOrder), array($firstInstallment, $nextInstallment)); } catch(Exception $e) { throw new Exception($e->getMessage()); } } /** * Retourne le montant total de la somme devant être * distribuée aux affiliés */ protected function _getTotalAmountForAffiliates($installement_nr) { $affiliates = $this->order[0]->getAffiliate(); if (!HIPAY_MAPI_UTILS::is_an_array_of($affiliates, 'HIPAY_MAPI_Affiliate')) return false; $total_aff = 0; foreach($affiliates as $aff) { $total_aff += $aff->getAmount(); } return $total_aff; } }