I have several custom wordpress endpoints https://devjesse.gettveverywhere.com/wp-json/authorizenet/
However, if i setup an inactive webhook on authorizenet and use the online test webhook button i receive the following error:
Error: The ping operation failed. This could be due to connectivity issues, invalid url or server downtime. Check the url details for the webhook and try again.
Using a php curl script i can get the current webhooks:
[ { "_links": { "self": { "href": "/rest/v1/webhooks/b8f7a92b-3d14-45d0-897f-95271faaf44b" } }, "webhookId": "b8f7a92b-3d14-45d0-897f-95271faaf44b", "name": "dev_sub", "status": "inactive", "url": "https://devjesse.gettveverywhere.com/wp-json/authorizenet/subscription", "eventTypes": [ "net.authorize.customer.subscription.updated", "net.authorize.customer.subscription.created", "net.authorize.customer.subscription.expiring", "net.authorize.customer.subscription.suspended", "net.authorize.customer.subscription.cancelled", "net.authorize.customer.subscription.terminated" ] } ]
and when calling the ping with my php curl script:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://apitest.authorize.net/rest/v1/webhooks/b8f7a92b-3d14-45d0-897f-95271faaf44b/pings'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Authorization: Basic ' . base64_encode(API_LOGIN_ID . ':' . TRANSACTION_KEY), 'Content-Type: application/json' )); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, ''); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
i receive the following error:
{ "status": 500, "reason": "PING_FAILED", "message": "The ping operation failed. This could be due to connectivity issues, invalid url or server downtime. Check the url details for the webhook and try again.", "correlationId": "5003a88f-4a1f-4c77-b374-84bdc1256082" }
I am unsure why authorizenet webhook is failing here. The endpoint works if i use my own php curl script with a copy of the notification info:
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://devjesse.gettveverywhere.com/wp-json/authorizenet/customer'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: 410', 'X-Opnet-Transaction-Trace: 676a6e12-d5d2-4f72-b14f-fac44a714d87-15432-570877 Expect 100-continue', 'X-Anet-Signature: sha512=5860384727AC755D0AAFB387EB775F1436C409E2F2BF38C6ED08717399A23FB1275A2363DC16A35A89E5541DBB3CED599A515A2165AA02EFB54596BD920ECA93' )); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"notificationId":"365a8c21-088e-4303-a11a-6d3d827cc9a4","eventType":"net.authorize.customer.created","eventDate":"2019-07-02T16:27:41.5972635Z","webhookId":"5be521cb-5805-4b25-9952-1fb661c70e71","payload":{"paymentProfiles":[{"customerType":"individual","id":"1507794447"}],"merchantCustomerId":"2200","description":"Profile created by Subscription: 5869582","entityName":"customerProfile","id":"1508341513"}}'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); echo $response;
07-03-2019 07:49 AM
The AWS ec2 link "works" for pinging for instance, http://ec2-3-84-172-111.compute-1.amazonaws.com/wp-json/authorizenet/customer
but has two problems:
1. no https
2. sends only one eventType which is completely wrong (net.authorize.payment.authcapture.created).
07-03-2019 08:14 AM
07-03-2019 01:54 PM
thanks for the reply, but i do not recieve a 500 erorr, but rather a 404 as expected.
Can you explain why the devjesse....url doesnt work but the equilavent URL from ec2 does ping? And if it does ping, only net.authorize.payment.authcapture.created is sent as an event type while it should send all the event Types as i have setup?
With my endpoints are we suppose to give a 200 response or something? Is a response even required? how
07-04-2019 03:02 AM
the exact same issue with the single event occurs with webhookinbox.com as well
07-04-2019 03:03 AM
Ok so the ping is working but only
net.authorize.payment.authcapture.created
event is being sent. webhooksinbox.com has the same issue.
07-04-2019 04:13 AM
07-04-2019 11:19 AM
Hi, well the issue is i want to test Fraud related events; however, even if i just select one event for a endpoint i still get the
net.authorize.payment.authcapture.created
event. If this is the only event that can be tested by pinging then this should be added to the documentation otherwise I do not understand how i am suppose to initiate a Fraud related test.
07-09-2019 05:42 AM
07-09-2019 10:13 AM
Hi,
forgive the ignorance but where is that exactly done? I cannot see anything related to test transactions in my account.
07-09-2019 10:17 AM