My problem is this:
I have a POS in which I need to send the following parameters by url:
- amount
- transaction reference (it is generated automatically according to the consecutive ticket)
- customer mail
Once the seller clicks the Pay button, the following happens:
string ticketNum = genTicketNumber();
if(ticketNum != "")
Response.Redirect(Constantes.Paginas.Carrito + "?" + montoPago+ "=" + referenciaVta+"="+txtemail.Text);
But when I click on it, in the URL I do not see that it has changed and still shows the url original
The problem is that, before I did, however since I distributed the entire cart in a Multiview control, the re-address with the "?" and it only works if I use a diagonal "/" that is:
It works
It does not work
EDIT the re-address I use to be able to tell my android app when I need to send to the activity where the charge is made. Here I leave the webView code where that was valid.
@Override
public void onPageFinished(WebView view, String url) {
//Toast.makeText(getApplicationContext(),"Carga Finalizada",Toast.LENGTH_LONG).show();
if(pd.isShowing())
pd.dismiss();
if(url.contains("sendScanReader"))
{
Intent i = new Intent(getApplicationContext(),Scan.class);
//pd.dismiss();
startActivityForResult(i,100);
}else if(url.contains("vta")){
StringTokenizer tokens = new StringTokenizer(url,"/");
String first = tokens.nextToken();
String second = tokens.nextToken();
StringTokenizer tokenValues = new StringTokenizer(second,"=");
//total a pagar durante la transaccion
String ttlPago = tokenValues.nextToken();
// referencia
String reference = tokenValues.nextToken();
reference = reference.replace("_","/");
// email
String email = tokenValues.nextToken();
Intent i = new Intent(getApplicationContext(),Payment.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
i.putExtra("ttlPago",ttlPago);
i.putExtra("vtaRef",reference);
i.putExtra("correo",email);
//view.loadUrl(Common.getHomeURL());
//pd.dismiss();
startActivityForResult(i,100);
}
else{
if(pd.isShowing())
pd.dismiss();
Common.setURL(url);
}
if(pd.isShowing())
pd.dismiss();
super.onPageFinished(view, url);
if(pd.isShowing())
pd.dismiss();
}