We have recently set up our PayPal Pro Hosted solution on Magento 2.2.6.

We have entered the correct Sandbox API Credentials, and the payment method is appearing on the checkout page.

When I select the PayPal option and then click Continue i should be redirected to the paypal website however, i am getting errors in the console.

Failed to load resource: the server responded with a status of 400 (Bad Request)

Unsafe JavaScript attempt to initiate navigation for frame with origin 
'https://website.co.uk' from frame with URL 'https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess?hosted_button_id=HSSS-.4mWl5'.
 The frame attempting navigation is targeting its top-level window, but is neither same-origin with its target nor has it received a user gesture.

Uncaught DOMException: Failed to set the 'href' property on 'Location': The current window does not have permission to navigate the target frame to 'https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess?hosted_button_id=HSSS-.'.
    at https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess?hosted_button_id=HSSS-

If we use the other option available through PayPal All-In-One Website Payments Standard The checkout successfully redirects to paypal and allows the me to put a test order through which goes to order state processing.

At the moment, this error appears and the order is created however goes to Pending Payment

Is this a known issue with PayPal or have i set it up wrong?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.