Commit 4a48d113 authored by mattwire's avatar mattwire
Browse files

Fix params to IPN

parent 051ac16d
......@@ -42,16 +42,15 @@ class CRM_Core_Payment_AuthNetIPN extends CRM_Core_Payment_BaseIPN {
* CRM_Core_Payment_AuthNetIPN constructor.
*
* @param string $ipnData
* @param array $headers
*
* @throws \JohnConde\Authnet\AuthnetInvalidCredentialsException
* @throws \JohnConde\Authnet\AuthnetInvalidJsonException
*/
public function __construct($ipnData, $headers) {
public function __construct($ipnData) {
$this->_params = $ipnData;
$this->getPaymentProcessor();
$webhook = new AuthnetWebhook(CRM_Core_Payment_AuthorizeNetCommon::getSignature($this->_paymentProcessor->getPaymentProcessor()), $ipnData, $headers);
$webhook = new AuthnetWebhook(CRM_Core_Payment_AuthorizeNetCommon::getSignature($this->_paymentProcessor->getPaymentProcessor()), $ipnData);
if ($webhook->isValid()) {
// Get the transaction ID
$this->trxnId = $webhook->payload->id;
......
......@@ -764,7 +764,7 @@ abstract class CRM_Core_Payment_AuthorizeNetCommon extends CRM_Core_Payment {
* @throws \CRM_Core_Exception
* @throws \CiviCRM_API3_Exception
*/
public static function handlePaymentNotification() {
public function handlePaymentNotification() {
$payload = file_get_contents("php://input");
$ipnClass = new CRM_Core_Payment_AuthNetIPN($payload);
if ($ipnClass->main()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment