Authorize.Net Unexpected token ! in JSON at position 0 hostedPaymentReturnOptions

When you configure the Authorize.Net Accept Hosted form, you might get the “Unexpected token ! in JSON at position 0” error b/c of malformed URL in the hostedPaymentReturnOptions parameter. To fix that I had to: Stop using “localhost” in the URLs. Apparently Authorize.Net doesn’t like that and throws an error. Escape ampersands with encodeURIComponent().

AuthorizeNet Webhook Stopped Working

All of a sudden a webhook in my Authorize.Net sandbox account stopped working. After some investigation, it turned that the hook became inactive in its settings. Here is how that happened: I registered a webhook and pointed it to a temporary postbin URL for testing. I triggered the webhook a few times during a few … Read more