Solved

Issue with iframe - https urls, payment gateway, responsive design and P3P cookie issue

Posted on 2013-11-08
7
388 Views
Last Modified: 2014-10-24
I have developed a site, where after certain functionality subscriber is redirected to a members promotional page. Where user will be shown a promotional page which is rendered in an iframe. After that; on window exit event two more promotional links entered by members are shown to subscribers one by one. The problem here is as we know iframe have some issues like

1.      Some https sites doesn’t support iframe.
2.      Some site returns no contents with an iframe error.
3.      Payment gateway doesn’t support in iframe.
4.      P3P in IE restricts to save cookies of iframe link.
5.      Responsive script doesn’t work when site is opened in iframe.

We have tried with following solutions.

-      Using HTTPS url as parent for iframe. (Not works for all HTTPS  url and payment gateways)
-      By fetching site contents using CURL. (Can’t store cookies for corresponding 3rd party url at browser).
-      Open url in new tab. (It solves all the problems, but it requires 2 new tabs; hence rejected by client).

Following is flow with links for reference.

-      A subscriber visits this page and subscribes for the corresponding offer/campaign.
http://onyalist.com/TheDoughIsInTheMaile/onyalist
-      After subscription user will be redirected to following thanks page where he will be shown confirm email message and first Promotional page entered by user.
http://onyalist.com/cp_page_thanks.php?cpn=TheDoughIsInTheMaile&rn=24265
-      If subscribe tries to exit from this page or to close the window a Leave/Stay popup is shown and at same time users second promotional page is rendered.
-      If subscribe again tries to exit from this page he will be shown Leave/Stay popup and third promotional page is rendered.

All these three pages are rendered using iframe. I have used Exit-splash script to show Leave/Stay message and to load the next promotional page at same time.

Now the requirement is, I have to keep promotional flow as it is but want to solve above iframe issues. It will be better if iframe is not used.

Please help me to resolve this issue or any other suggestion I can work on.
Thanks in advance.
0
Comment
Question by:SandeepEluminous
  • 3
  • 2
7 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39633853
Instead of iframes, use a div then fetch the external content with AJAX calls and populate the div with the response.  If you have control of the server delivering the external content then strip it down to put the content in a single container for delivery.  If you do not control the source of the external content then you will need to parse the delivered document to scrap the content elements.


Cd&
0
 

Author Comment

by:SandeepEluminous
ID: 39640814
@COBOLdinosaur
Fetching contents using CURL and AJAX works. Much of parsing is needed for external URLs; but it creates three issues.
  1) Storing cookies at browser end for corresponding URL.
  2) Handling redirection. (e.g. Header redirection)
  3) Any JS error on the page affects other JS functionality which are important.
Please suggest any solution for these issues also.
Thanks for your reply.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39642106
The solution to all three issues is the same:

Detailed parsing.  You are grabbing content that you do not have control over at the source.  

You are going to have to anticipate all possible result sets and write parsing, sanitation validation and filtering to address all possible errors.

The correct solution is the use of tabs; which has been rejected by the client.  Therefore you are stuck with having to do substantial work and I hope you are charging the client a premium hourly rate for the extra work caused by their stupidity.

There is no easy solution when you are grabing raw page content.

That said, I don't understand why cookies or re-direction are issues.  Are you getting errors from those operations?

Cd&
0
 

Author Comment

by:SandeepEluminous
ID: 39656532
Thanks @COBOLdinosaur
I followed your suggestions and got success to solve almost all issues. But now I stuck on a issue which is related to payment gateway. Check this link.
http://onyalist.com/dev/test_redirect_1.php
The original url is
http://sokuleassets.com/sk/OTO/bronze/plus/
Now the issue is. The payment gateway Payza shows the error. It is because wrong HTTP Refer value and I know that it can not be solved. Same thing happened with some other payment gateways also.
Please provide any possible solution to solve it.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39657530
Well you are deep into security issues.  Those only get resolved one way.  All parties to the transaction have to agree on protocols, standard formats, and verification procedures.

If one of the partners is generating or reporting an error then there needs to be an exchange of information about requirements, standard formats, and details of the specific protocol.

Using http: instead of https: for financial transactions is unheard of and  is dangerous, insecure, and opens everyone involve in severe attacks by criminals.

Cd&
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
This article will show, step by step, how to integrate R code into a R Sweave document
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now