You are on page 1of 2

https://192.168.1.50/Cashdro3WS/index.php?

operation=startOperation&name=manager&password=2&type=4&posid=666&posuser=satan&par
ameters={"amount":""14500"\"}
https://192.168.1.50/Cashdro3WS/index.php?
operation=acknowledgeOperationId&name=manager&password=2&operationId=0

---------------------------------------------

validar conexion con cashdro


https://____/Cashdro3WS/index.php?operation=doTest&name=____&password=____

https://192.168.1.50/Cashdro3WS/index.php?operation=doTest&name=manager&password=2

Respuesta

{"code":1,"data":""} // Respuesta correcta, hay conexi�n con


CashDro

{"code":-1,"data":"AuthenticationFailed"} // Usuario y/o password incorrecto

-------------

Operacion Venta

https://____/Cashdro3WS/index.php?
operation=startOperation&name=____&password=____&type=4&posid=____&posuser=____&par
ameters={"amount":"___"}
https://192.168.1.50/Cashdro3WS/index.php?
operation=startOperation&name=manager&password=2&type=4&posid=666&posuser=satan&par
ameters={"amount":"145"}
https://192.185.14.56/Cashdro3WS/index.php?
operation=acknowledgeOperationId&name=manager&password=2&operationId=0
{"code":1,"data":"1"} //pago ok

{"code":1,"data":"172"}
{"code":1,"data":"173"}
{"code":1,"data":"175"}
----------------Peticion de operacion--------------------
Uri address = new Uri("https://192.168.1.50/Cashdro3WS/index.php?
operation=startOperation&name=manager&password=2&type=4&posid=666&posuser=satan&par
ameters={\"amount\":\"" + precioTemp + "\"}");

Resp: {"code":1,"data":"1"} // la data es el idOperation asignada por el cashdro

------------Ejecutar operacion------------------------
Uri address = new Uri("https://192.168.1.50/Cashdro3WS/index.php?
operation=acknowledgeOperationId&name=manager&password=2&operationId=" +
idOperation);

Resp: {"code":1,"data":""}
---------Polling a cashdro---------------------------
//https://192.168.1.50/Cashdro3WS/index.php?
operation=doTest&name=manager&password=2
Uri address = new Uri("https://192.168.1.50/Cashdro3WS/index.php?
operation=doTest&name=manager&password=2");

---------Estado de operacion solicitada------------------------------


//https://192.168.1.5/Cashdro3WS/index.php?
operation=askOperation&operationId=0&name=manager&password=2
Uri address = new Uri("https://192.168.1.50/Cashdro3WS/index.php?
operation=" + idOperation +"&name=manager&password=2");
{"code":1,"data":"{"operation":{
"operationid":"7",
"state":"F", //el state F es cuando
"total":"500",
"totalin":"0",
"totalout":"- 500",
-----------Cancelar operacion--------------------------------
//https://192.168.1.50/Cashdro3WS/index.php?
operation=finishOperation&name=manager&password=2&operationId=0&type=4
Uri address = new Uri("https://192.168.1.50/Cashdro3WS/index.php?
operation=finishOperation&name=manager&password=2&operationId=" + idOperation +
"&type=4");
------------ACK to Cashdro ----------------------------------
//https://192.168.1.50/Cashdro3WS/index.php?
operation=setOperationImported&name=manager&password=2&operationId=0
Uri address = new Uri("https://192.168.1.50/Cashdro3WS/index.php?
operation=setOperationImported&name=manager&password=2&operationId=" +
idOperation);
--------COMUN---------------------------------

ServicePointManager.ServerCertificateValidationCallback = delegate
{ return true; };
using (WebClient webClient = new WebClient())
{
var stream = webClient.OpenRead(address);
using (System.IO.StreamReader sr = new
System.IO.StreamReader(stream))
{
var page = sr.ReadToEnd();
Console.WriteLine("resultado lectura2(execute): {0}", page);

}
}

You might also like