1

Error 1:

Unsafe JavaScript attempt to access frame with URL "Test URL" from frame with URL https://www.sandbox.paypal.com/webapps/checkout/webflow/sparta/expresscheckoutvalidatedataflow?execution=e1s1. Domains, protocols and ports must match.

Error 2:

Unsafe JavaScript attempt to access frame with URL "Test URL" from frame with URL https://www.sandbox.paypal.com/webapps/checkout/webflow/sparta/expresscheckoutvalidatedataflow?execution=e1s2. The frame requesting access set 'document.domain' to 'paypal.com', but the frame being accessed did not. Both must set 'document.domain' to the same value to allow access.

Ok So I am trying to integrate Paypal Express Checkout, the logic flow for the Purchase fine except for 1 exception. When Paypal purchase is completed/canceled, the Lightbox doesn't close, the Paypal handler shows the website inside of the Lightbox.

I know there are a lot of issues on SO about this but none of them seem to work. FYI im running in Chrome, these errors don't appear in Firefox

CStreel
  • 2,642
  • 2
  • 19
  • 37
  • this might be the solution do check it out http://stackoverflow.com/questions/1886547/access-is-denied-javascript-error-when-trying-to-access-the-document-object-of – Rohit Patel Dec 20 '12 at 05:28

1 Answers1

0

Ok so it seems as though I was doing it all wrong, what I was doing was passing the Paypal checkout URL to the frame

in my Frame window

window.location = ${checkoutURL};

what I need to do was perform a callback on my mainWindow and tell Paypal handler to perform the redirect for me since it was in control of the Frame window

var handler = window["paypal_handler"];
handler.closeFlow();        //Just in case another flow was already running when it shouldn't be
handler.startFlow(jQuery.unescape(data.checkoutUrl));
CStreel
  • 2,642
  • 2
  • 19
  • 37