$paymentProcessorID = CRM_Utils_Array::value('paymentProcessor', $ids);
$contributionType = new CRM_Financial_BAO_FinancialType();
$contributionType->id = $this->financial_type_id;
- if (!$contributionType->find(TRUE)) {
- throw new Exception("Could not find financial type record: " . $this->financial_type_id);
- }
+ $contributionType->find(TRUE);
+
if (!empty($ids['contact'])) {
$this->_relatedObjects['contact'] = new CRM_Contact_BAO_Contact();
$this->_relatedObjects['contact']->id = $ids['contact'];
if (!empty($contributionPage)) {
$dao = new CRM_Core_DAO();
$contribution_page = $dao->createTestObject('CRM_Contribute_DAO_ContributionPage');
+ $contribution_page->payment_processor = 1;
+ $contribution_page->save();
$contribution->contribution_page_id = $contributionPageID = $contribution_page->id;
//for unknown reasons trying to do a find & save on a contribution with a receive_date set
// doesn't work. This seems of minimal relevance to this test so ignoring