<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Where Do I Find Webhook Logs and Test an Active Webhook? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76621#M47880</link>
    <description>&lt;DIV&gt;&lt;DIV class="wDYxhc"&gt;&lt;DIV class="LGOjhe"&gt;&lt;SPAN class="ILfuVd NA6bn"&gt;&lt;SPAN class="hgKElc"&gt;You can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;obtain&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;webhook id&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by looking at its link, the number after &lt;A href="https://discord.com/api/webhooks/" target="_self"&gt;https://discord.com/api/&lt;STRONG&gt;webhooks&lt;/STRONG&gt;/&lt;/A&gt; is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;, and the part after that is the token.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Jun 2021 08:19:13 GMT</pubDate>
    <dc:creator>tixex</dc:creator>
    <dc:date>2021-06-03T08:19:13Z</dc:date>
    <item>
      <title>Where Do I Find Webhook Logs and Test an Active Webhook?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76609#M47870</link>
      <description>&lt;P&gt;I am trying Authorize.net for the first time and have successfully setup a sandbox checkout option using the Accept Hosted redirect method, but as far as I can tell my webhook is not receiving the&amp;nbsp;net.authorize.payment.authcapture.created event or if it is it is not processing it right. Does Authorize.net have place where I could view the history of all attempts to send webhook notifications to my server and what was contained in those hooks? Is there a way I could click on a transaction and make Authorize.net send a new notification right away?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I am using a domain that is not in production on my remote server becasue I couldn't find a solution for testing webhooks on localhost. I am coming from Stripe and they had an app you could install on your desktop that would allow that, but I see no such thing from Authorize. The method I am trying to use is the same one found at&amp;nbsp;&lt;A href="http://www.johnconde.net/blog/handling-authorize-net-webhooks-with-php/" target="_blank"&gt;http://www.johnconde.net/blog/handling-authorize-net-webhooks-with-php/&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some sample code edited to omit some potentially sensitive stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;namespace Authnetjson;
// Set your secret key. Remember to switch to your live secret key in production.
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// error message to be logged
$error_message = "This is an error message!";
// path of the log file where errors need to be logged
$log_file = "phperr.txt";
// setting error logging to be active
ini_set("log_errors", TRUE);
// setting the logging file in php.ini
ini_set('error_log', $log_file);
require_once('../../../wp-load.php');
require 'vendor/autoload.php';
require_once 'constants/SampleCodeConstants.php';
$headers = getallheaders();
$payload = file_get_contents("php://input");
$webhook = new AuthnetWebhook(\SampleCodeConstants::WEBHOOK_SIGNATURE, $payload, $headers);
if ($webhook-&amp;gt;isValid()) {
    // Access notification values
    $transactionId = $webhook-&amp;gt;payload-&amp;gt;id;
    $merchantrefid = $webhook-&amp;gt;payload-&amp;gt;merchantReferenceId;
    $eventtype = $webhook-&amp;gt;payload-&amp;gt;eventType;
    // Here you can get more information about the transaction
    $request  = AuthnetApiFactory::getJsonApiHandler(\SampleCodeConstants::MERCHANT_LOGIN_ID, \SampleCodeConstants::MERCHANT_TRANSACTION_KEY);
    $response = $request-&amp;gt;getTransactionDetailsRequest(array(
        'transId' =&amp;gt; $transactionId,
    ));
    $transtype = $response-&amp;gt;transaction-&amp;gt;transactionType;
    $transstatus = $response-&amp;gt;transaction-&amp;gt;transactionStatus;
    global $wpdb;
    if($eventtype == 'net.authorize.payment.authcapture.created')
    {
        $wpdb-&amp;gt;query("UPDATE orders SET status = 'paid', transid = '".$transactionId."', transtype = '".$transtype."', transstatus = '".$transstatus."' WHERE refid = '".$merchantrefid."'");
    }
}
http_response_code(200);&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Jun 2021 00:25:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76609#M47870</guid>
      <dc:creator>PayDelete</dc:creator>
      <dc:date>2021-06-03T00:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Where Do I Find Webhook Logs and Test an Active Webhook?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76610#M47871</link>
      <description>&lt;P&gt;I also added a second endpoint at WebhookInbox just to make sure webhooks are being sent somewhere. I have yet to receive a single notification at that location despite it being listed as an active webhook in my account. I made another test purchase and still have not received any notifications at all at the second endpoint.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 00:59:26 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76610#M47871</guid>
      <dc:creator>PayDelete</dc:creator>
      <dc:date>2021-06-03T00:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Where Do I Find Webhook Logs and Test an Active Webhook?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76611#M47872</link>
      <description>&lt;P&gt;Also, how do I get the webhook identification number? When I check the webhooks section of my account the webhook id numbers are not displayed.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 01:37:59 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76611#M47872</guid>
      <dc:creator>PayDelete</dc:creator>
      <dc:date>2021-06-03T01:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Where Do I Find Webhook Logs and Test an Active Webhook?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76621#M47880</link>
      <description>&lt;DIV&gt;&lt;DIV class="wDYxhc"&gt;&lt;DIV class="LGOjhe"&gt;&lt;SPAN class="ILfuVd NA6bn"&gt;&lt;SPAN class="hgKElc"&gt;You can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;obtain&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;webhook id&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;by looking at its link, the number after &lt;A href="https://discord.com/api/webhooks/" target="_self"&gt;https://discord.com/api/&lt;STRONG&gt;webhooks&lt;/STRONG&gt;/&lt;/A&gt; is the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;, and the part after that is the token.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Jun 2021 08:19:13 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Where-Do-I-Find-Webhook-Logs-and-Test-an-Active-Webhook/m-p/76621#M47880</guid>
      <dc:creator>tixex</dc:creator>
      <dc:date>2021-06-03T08:19:13Z</dc:date>
    </item>
  </channel>
</rss>

