There is problem with
https://sportsticket.uy/recibirplexo
[CODE lang="b4x" title="LambdaTest"]
'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
'Private urlRespuesta As String = "https://sportsticket.uy/recibirplexo" ' <-- Take note HTTPS is not working !
Private urlRespuesta As String = "http://sportsticket.uy/recibirplexo"
Private urlError As String = "https://aru.sportsticket.uy/error.html"
Private Timer1 As Timer
End Sub
Sub AppStart (Args() As String)
Log("App started!!!")
Timer1.Initialize("Timer1", 3000)
Timer1.Enabled = True
StartMessageLoop
End Sub
Sub Timer1_Tick
Log ( "Timer started!!!" )
Timer1.Enabled = False
Wait For ( ResponseHandler($"{"email":"
[email protected]"}"$) ) Complete (Value As String)
Log( Value )
StopMessageLoop
End Sub
Public Sub ResponseHandler (data As String) As ResumableSub
Try
Dim strResult As String
Dim MapDatos As Map = data.As(JSON).ToMap
Dim strEmail As String = MapDatos.Get("email")
Log( "Email: " & strEmail )
'Dim strGenerado As String=File.ReadString(File.DirAssets,"CheckoutWeb.txt")
'Plexo(strGenerado)
Wait For ( Plexo(data) ) Complete (Result As String)
strResult = Result
Catch
Log( LastException )
strResult = urlError
End Try
Return strResult
End Sub
Sub Plexo (strM As String) As ResumableSub
Dim strResult As String
Dim j As HttpJob
j.Initialize("", Me)
j.PostString(urlRespuesta, strM)
Wait For (j) JobDone (j As HttpJob)
If j.Success Then
Log( "Result: " & j.GetString )
strResult = urlRespuesta
Else
Log( "Error: " & j.ErrorMessage )
strResult = urlError
End If
j.Release
Return strResult
End Sub[/CODE]