X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment%2FElavon.php;h=bcbe845b7d158c060c079dd24e18b4bd8bf0dcf7;hb=c7956780e95aec6abcb7b73b6cf5d7b30b2d49ff;hp=a45c07c0bd3a6ac41b18d1d6e5d9be0bd742fa70;hpb=e32e663dddae93274cc28fd0539e48a98edbe8df;p=civicrm-core.git diff --git a/CRM/Core/Payment/Elavon.php b/CRM/Core/Payment/Elavon.php index a45c07c0bd..bcbe845b7d 100644 --- a/CRM/Core/Payment/Elavon.php +++ b/CRM/Core/Payment/Elavon.php @@ -145,7 +145,7 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment { CRM_Utils_Hook::alterPaymentProcessorParams($this, $params, $requestFields); // Check to see if we have a duplicate before we send - if ($this->_checkDupe($params['invoiceID'])) { + if ($this->checkDupe($params['invoiceID'], CRM_Utils_Array::value('contributionID', $params))) { return self::errorExit(9003, 'It appears that this transaction is a duplicate. Have you already submitted the form once? If so there may have been a connection problem. Check your email for a receipt. If you do not receive a receipt within 2 hours you can try your transaction again. If you continue to have problems please contact the site administrator.'); } @@ -259,21 +259,6 @@ class CRM_Core_Payment_Elavon extends CRM_Core_Payment { } } - /** - * Checks to see if invoice_id already exists in db. - * - * @param int $invoiceId - * The ID to check. - * - * @return bool - * True if ID exists, else false - */ - public function _checkDupe($invoiceId) { - $contribution = new CRM_Contribute_DAO_Contribution(); - $contribution->invoice_id = $invoiceId; - return $contribution->find(); - } - /** * Produces error message and returns from class. * @param string $errorCode