Android Question Webview Problem

tufanv

Expert
Licensed User
Longtime User
Hello,

I am trying to integrate a payment system to my android app . Normally the system is made for web where you send variables to a php file with form but it is a responsable page so it can be used for mobile also. If the sent variables are correct a webpage is loaded at the payment company's secure website where you enter payment info. I send the necessary variables, with httpjob , variables are being acceptedand as response i get a html code which normally is the code for the new opening page at the company's secure payment url.

Anyways, When i get the html code as response I show it with a webview but the problem is returned html code consists a part that :

B4X:
<script language="JavaScript">
 location.href="\/order\/pay.php?PRODS=37988583&QTY=1&REF=&LANG=tr&CART_ID=3106c3730bf6795b8908ecf8c7d52836&action=save_order";
                        </script>

but of course /order/pay.php is not present on my mobile it is present on remote. I get an error like this on my phone:



What am i doing wrong here ?
Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Log file shows the url different from the normal for example :
location.href="\/order\/pay.php is normally
location.href="/order/pay.php

I wanted to change the html code with code:

B4X:
res=res.Replace("\/order\/pay.php","https://secure.payu.com.tr/order/pay.php")
WebView1.LoadHtml(res)

but this corrputs things i think as i get invalid order error at the loaded page.
 
Upvote 0
Top