/** * check with valid array */ function testPaymentDelete() { $contributionTypeID = 1; // create contribution $contributionID = $this->contributionCreate($this->_contactID, $contributionTypeID); $this->_participantPaymentID = $this->participantPaymentCreate($this->_participantID, $contributionID); $params = array('id' => $this->_participantPaymentID); $deletePayment =& civicrm_participant_payment_delete($params); $this->assertEquals($deletePayment['is_error'], 0); }
/** * Function to delete participant payment * * @param int $paymentID */ function participantPaymentDelete($paymentID) { require_once 'api/v2/Participant.php'; $params = array('id' => $paymentID); $result =& civicrm_participant_payment_delete($params); if (CRM_Utils_Array::value('is_error', $result)) { throw new Exception('Could not delete participant payment'); } return; }