cancel
Showing results for 
Search instead for 
Did you mean: 

not receiving webhook notification and also not able to identify event for Recurring billing

when I ping my webhook it returns nothing

Error: Authorization has been denied for this request.

https://apitest.authorize.net/rest/v1/webhooks/fbd79f93-5e5a-4b19-8914-e91cf3d536b8/pings

 

I am following this example:- http://www.johnconde.net/blog/handling-authorize-net-webhooks-with-php/

but I am not receiving payload

My code In API Endpoint URL PHP file is like this

 

$headers = getallheaders();

$payload = file_get_contents("php://input");

 

$webhook = new AuthnetWebhook(AUTHNET_SIGNATURE, $payload, $headers);

if ($webhook->isValid()) {

    // Access notification values

     // Get the transaction ID

    $transactionId = $webhook->payload->id;

    // Here you can get more information about the transaction

    $request  = AuthnetApiFactory::getJsonApiHandler(AUTHNET_LOGIN, AUTHNET_TRANSKEY);

    $response = $request->getTransactionDetailsRequest(array(

 

        'transId' => $transactionId

    ));

}

what are the steps for receiving webhook notification in php

umesh278
Member
1 REPLY 1

Hi @umesh278,

 

You can set up Webhooks and send requests to ping using the Webhooks API, but you need to make sure you're sending the Authorization information correctly. If you're getting the error "Authorization has been denied for this request" when you make a ping request through the API, it means you don't have the Authorization information correct in the request. So, we're never even sending a test notification to your listener URL since we never processed the request from you.

 

It's probably easier while you're testing to just do all of your Webhooks setup and management through the Merchant Interface. When you log in and find your way to "Webhooks", you can set up new Webhooks, and test existing ones just by clicking a button.

Aaron
All Star