Iframe Problem in OS Mobile

Iframe Problem in OS Mobile

  

Hi,

I have a mercurypay (vantiv) iframe which I use, however, I am having a hard time determining what the URL of the OS Mobile app would be. Here are the details.

The initialization of mercurypay requires a return URL so that whenever you click a submit button inside its iframe, it will redirect back to your app. So I provided it with a value of below.

SyntaxEditor Code Snippet

"https://<dev-envi-enterprise>.outsystemscloud.com/OrderingApp/CheckoutScreenSuccessScreen"


However, after clicking the cancel or submit button, it redirected to error 405 page.

Can someone help on what's the correct URL to be used for this?

I already tried to check it using Chrome DevTools, but no luck so far.


Hi jgab,

Since you're using the Preview in Device feature, let me ask you if this also happens is the real device? 

Is this a mobile or web app? If its the former, you're probably not gonna be able to do a server-side redirect since mobile apps use client-side routing. I would suggest that you create a web app with one landing page that contains a javascript to set the location of the wrapper iframe. Then point the return URL to the URL of that landing page.

João Neves wrote:

Hi jgab,

Since you're using the Preview in Device feature, let me ask you if this also happens is the real device? 

Is this a mobile or web app? If its the former, you're probably not gonna be able to do a server-side redirect since mobile apps use client-side routing. I would suggest that you create a web app with one landing page that contains a javascript to set the location of the wrapper iframe. Then point the return URL to the URL of that landing page.

Hi João,

Thank you for your response. 

This is a mobile app from OS Mobile. It's not a web app which is responsive to mobile. 

On your suggestion, I am not entirely sure if it's possible because this is purely a mobile app. 


It it is possible since you'll be working with URLs - no need to have references between eSpaces.


May I request for a sample or at least steps on how to implement your suggestion.

(My apologies, though, this would be my first time implementing an iframe.)

1. Create a new web app with a screen (don't forget that it should be anounymous)

2. Configure the mercurypay service redirect url to be the url on the screen created before

Upon navigating to that previous screen you may discard the iframe.

João Neves wrote:

1. Create a new web app with a screen (don't forget that it should be anounymous)

2. Configure the mercurypay service redirect url to be the url on the screen created before

Upon navigating to that previous screen you may discard the iframe.

Hi João,

I am not sure on how can the web app redirect back to the mobile app, however, your suggestion worth a try though but still puzzled.


You shouldn't, the iframe should just be used to load the mercurypay site and once you're redirected to your web app page, you should notify with the iframe's parent page (using javascript) that the process finished.

Hi jgab. I was looking for the same answer for the same problem. However, I'm facing another problem. How were you able to open an iframe inside you mobile application? 

Thank you!