Post by Mikuhly » Fri Feb 08, 2013 4:52 pm

I have Opencart v1.5.5.1. I'm using Opencart in an iframe on my html website. When 'Confirm order' is pressed it doesn't forward to the Paypal website. I've searched for a solution but have only found this:

"PayPal will detect a framed re-direct and block responses as you cannot access any of the PayPal payment system in an iFrame.

An option would be to CNAME the shop. url to the main website, or just migrate the shop onto the correct domain so it works without an iFrame"

I have no idea how to do this. My best guess is that the confirm buttons code is in "catalog/view/theme/default/template/checkout/confirm.tpl" and i THINK this code at the end could be it...but i'm probably wrong.

<div class="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<script type="text/javascript"><!--
location = '<?php echo $redirect; ?>';
//--></script>
<?php } ?>

Can someone please help me? This website's deadline is overdue so i need a fix asap. Thanks!

Newbie

Posts

Joined
Fri Feb 08, 2013 3:48 pm

Post by alibear57 » Wed Oct 16, 2013 7:07 pm

Why has no-one responded to this - does nobody else know the answer - because I need the answer also.

Newbie

Posts

Joined
Wed Feb 29, 2012 7:56 pm

Post by Qphoria » Wed Oct 16, 2013 9:25 pm

paypal doesn't work in a frame is the answer. You can't run your store in an iframe if using paypal standard.

You need to use Paypal Express instead.

Your standard paypal account should already support Paypal Express, you likely just need to enable api access for it.
Here's a how-to guide.

Then just purchase the paypal express module and enable it like the other paypal module. Enter the credentials and it should work for you

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by butte » Sat Oct 26, 2013 9:38 am

Qphoria's suggestion works quite well, but there is one basic workaround, alibear57. Problem: your OC is in a frame, PayPal refuses to be in a frame,you must launch the customer from OC inside your frameset to land inside PayPal outside your frameset. Analog: Scotty wants to beam customer from on-board Enterprise to PayPal on-board Enterprise, PayPal refuses and demands that Scotty beam customer from on-board Enterprise to PayPal outside Enterprise. Your customer MUST be sent OUTSIDE your own frameset to reach PayPal -- no exceptions.

Solution: standard code in a form input line discharging an order or a cart to PayPal essentially sends customer to
<A HREF="https://www.PayPal.com/blahblahblah">
but you are attempting instead
<A HREF="https://www.PayPal.com/blahblahblah" TARGET="sameframe">
and MUST change that to instead
<A HREF="https://www.PayPal.com/blahblahblah" TARGET="_top">
before it will work, and with PayPal Standard, at least, it does work (I have done that routinely for several years, still do). Whether in hard code by hand or by generated code on the fly, that specific step, target="_top", must be accomplished one way or another in order to reach PayPal from inside a frameset.

[That can be done inside the appropriate payment module, among the set of .php and .tpl files -- each family set has the same payment module name with one of those two file extensions. Look through the /catalog/ tree.]

When PayPal is done with the customer, then the customer will (if he has not somehow been diverted or diverted himself elsewhere) be sent back to your own website (domain, as though he just got there in the first place) or to your thank you or cart (inside your own framename). You will probably settle for customer landing back on your frame after you tinker with the return URL possibilities in PayPal, but you can tinker with them and test them, and you actually can send your customer back to a target inside your frameset. Your customer MAY be sent back INSIDE your own frameset upon return FROM PayPal, IF you find the right way to address that in YOUR OWN return URL setting INSIDE your PayPal account (there is a return URL setting).

Then you, Scotty, and PayPal, and customer are all happy, while Enterprise is busy figuring out where Spock went this time.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by alibear57 » Tue Feb 04, 2014 4:03 pm

[quote="butte"]Qphoria's suggestion works quite well, but there is one basic workaround, alibear57. Problem: your OC is in a frame, PayPal refuses to be in a frame,you must launch the customer from OC inside your frameset to land inside PayPal outside your frameset. Analog: Scotty wants to beam customer from on-board Enterprise to PayPal on-board Enterprise, PayPal refuses and demands that Scotty beam customer from on-board Enterprise to PayPal outside Enterprise. Your customer MUST be sent OUTSIDE your own frameset to reach PayPal -- no exceptions.

Wow butte, so sorry for this late acknowledgement of your brilliant and humorous reply. The site in question went off the air because of political reasons, which I won't go into, and only now that it's back in force again did I come on to see if I could, again, find anyone with an answer to my problem. I wish I had noticed the tick box to get an email notification when somebody responded, then I would have seen your reply sooner - I hope you still see this and it's not too late to express my appreciation.

I have not fully digested all your instructions yet, I thought I would send this message asap and then get stuck into trying your solution - which I am away to attempt right now.

Again, thank you so much for your advice.

Newbie

Posts

Joined
Wed Feb 29, 2012 7:56 pm
Who is online

Users browsing this forum: No registered users and 9 guests