X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment%2FAuthorizeNet.php;h=ed28adc948c362b751b652d0e6efd59e02f4eeb3;hb=19a93bccf7714cb49387b48ecef29ce52e3f00df;hp=ef44058b12b659df741cd64681e8983213b25af7;hpb=ce6ca4a3e8d2737bd853360e8be4e31f70213d24;p=civicrm-core.git diff --git a/CRM/Core/Payment/AuthorizeNet.php b/CRM/Core/Payment/AuthorizeNet.php index ef44058b12..ed28adc948 100644 --- a/CRM/Core/Payment/AuthorizeNet.php +++ b/CRM/Core/Payment/AuthorizeNet.php @@ -184,13 +184,13 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment { // fetch available contribution statuses $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'); + $result = []; // check for application errors // TODO: // AVS, CVV2, CAVV, and other verification results switch ($response_fields[0]) { case self::AUTH_REVIEW: - $params['payment_status_id'] = array_search('Pending', $contributionStatus); - $params['payment_status'] = 'Pending'; + $result = $this->setStatusPaymentPending($result); break; case self::AUTH_ERROR: @@ -203,13 +203,12 @@ class CRM_Core_Payment_AuthorizeNet extends CRM_Core_Payment { default: // Success - $params['trxn_id'] = !empty($response_fields[6]) ? $response_fields[6] : $this->getTestTrxnID(); - $params['payment_status_id'] = array_search('Completed', $statuses); - $params['payment_status'] = 'Completed'; + $result['trxn_id'] = !empty($response_fields[6]) ? $response_fields[6] : $this->getTestTrxnID(); + $result = $this->setStatusPaymentCompleted($result); break; } - return $params; + return $result; } /**