Open paypal comfirmation in a pop up then return url

How I have the pay flow setup is this..

In Facebook iFrame: Cart -> Shipping -> Confirm Order with Paypal -> Opens new Tab/Window

In that new Tab/Window: Paypal Login Page -> Confirm Paypal Payment -> Return (Redirect) Page is the raw url of the shop displaying this:

Thank you for your order! We appreciate your business, and please come back often to check out our new products.
Your PayPal payment for this order totaling $1.15 is complete. The PayPal transaction number is 70xxxxxxxxxx5D.
You may track the latest status of your order(s) here:

Is there any way I can have the return page be sent back to the iframe? i guess it could be done with target=_parent ?

Would having the Paypal Login screen in a popup (instead of target=_blank).

Whats the url paypal uses as a redirect? and where can i find it in the core code?

and do you have any ideas?


  • DavidM
    • DEV MAN’s Mascot

    Hi Ben,

    There's not a way to customize that specific step of the process, apart from the rest of the checkout process. In marketpress-includes/themes/ there's a file Themeing_MarketPress.txt that goes through the creation of various template files.

    You can create a checkout template. Would that work for you in this case?


  • Jamin
    • Site Builder, Child of Zeus

    In a perfect world, the PayPal window would open inside the Facebook iFrame, but I know that cant happen due to cross-domain stuff. Paypal forces the page full screen.

    If I could get the Paypal or confirm checkout screen to popup with javascript instead of target=_blank then i think I could probably get away with it like that.

  • Jamin
    • Site Builder, Child of Zeus

    Ahh i worked it out!

    plugins-gateway/paypal-chained-payments.php - line 693 ish

    function RedirectToPayPal($token) {
    		// Redirect to here
    		$payPalURL = $this->paypalURL . $token;
    		<script> ("<?php echo $payPalURL; ?>", "PayPal","location=0,status=0,scrollbars=0, width=950,height=750");

    If only I had looked in there earlier.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.