javascript - Paypal lightbox: does not permit cross-origin framing -
I have tried to go about using the PayPal Lightbox in a slightly different way to trigger an AJAX call. Uses a button which then generates PayKey and if everything goes well, then the form is triggered to create and submit the form (from the document).
When I make the button lightbox html but the content is not loaded in it. Instead, I get an error:
Rejected by Load X-Frame-Option: https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_dispatch- Failed cross-original framing
My code:
& lt; Head & gt; & Lt; Script src = "https://www.paypalobjects.com/js/external/dg.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; / Head & gt;
External script:
$ ("#outoutout"). Click (function () {var id = $ (this) .data ("id"); if (id) {payee}}}}; Function Payment (id) {$. AJAX ({url: 'PayPal / pay-chain.php', type: 'post', data: "id =" + id, success: function (data) {var info = (JSON. (Data,)); (Information ['type'] == 'success') {var output = info ['URL']. Substr (0, 64) + "expType = light and" + info ['URL (' & lt; form Action = "'+ +" PP = "PPDGFrame" class = "standard">
button at the bottom of the page:
& lt; Script type = "text / javascript" charset = "utf-8" & gt; Var EmbeddedPPflow = New PayPAL.apps.DGFlow ({Trigger: 'Checkout'}); & Lt; / Script & gt;
I am thinking that order order has to do with this, but it is not able to understand. Any help would be great!
EDIT: I have just created an empty page and copied the script correctly from the documentation. I still get the same error. Does it have something to do with server settings? I'm running a WampServer with an address like 192.168.1.1/myysite/index.html
Comments
Post a Comment