accept-sample-app icon indicating copy to clipboard operation
accept-sample-app copied to clipboard

Sample not returning response

Open aress-preeti opened this issue 5 years ago • 2 comments

Hello,

I have downloaded and setup the sample code. When I enter the details and hit "Pay" button it shows "Processing..." and no further response is displayed on screen, whereas I can see the response in Network tab returned by Authorize.net

image

Can anyone help with it.

aress-preeti avatar May 03 '19 13:05 aress-preeti

anyone have a response/solution for this? I'm sure it's something in setup that's missing, but have no idea what it is. Setup on sandbox, I get the transaction email notification that it went through, and the daily overview email comes in showing the transaction, so it clearly processed... but the page is not redirecting or showing the receipt properly? Tried adding tags for hostedPaymentReturnOptions in getHostedPaymentForm to no avail.

sojrner avatar May 14 '19 16:05 sojrner

I found the issue in my case; posting here to help others.

This was directly related to this issue on the Authorize forum, regarding the Content Security Policy in the header. Unlike those older versions dealt with there, I can replicate in newest Firefox as well, and it appears that all browsers have the problem. Once implemented for the page, the issue went away and the receipt displays properly. A quick fix was to implement the CSP directly in the markup like so: <meta http-equiv="Content-Security-Policy" content="frame-ancestors 'self' *.YOURSITE.com *.authorize.net">

I have not tested anything other than the hosted, main pay method on the sample app, as that was all I needed. I also have yet to get this working in apache's .htaccess file, but so far the markup method is working.

sojrner avatar May 14 '19 20:05 sojrner