Welcome! Log In Create A New Profile

Advanced

[WM24] Trying to bridge with payment gateway

Posted by RobertLeo 
[WM24] Trying to bridge with payment gateway
April 13, 2020 04:16AM
Hello guys,

I am attempting to bridge my app with a local payment gateway, but there is one problem, the code they have provided is in JAVA that works in Android Studio (because it was made for it), but it is uncertain in Windev even after using the instructions given in this [help.windev.com]

so is there any other way to integrate the JAVA codes into WM, and is there any way to see if the data has been sent from the mobile device to the webservice?
if you need to do things that aren't possible directly in wm java global procedure (callbacks, by example), you can try to proceed another way:
- in an external tool (eclipse, android studio, etc), you create a JAR that does what you need
- you insert that jar in your wm app, and call it from there

of course, the trick is to deport all things that cannot work in wm inside the jar itself, and to put in place a communication system between the jar and the wm app

In some case, you can just return a value, in others, when there is a callback and you can't just send back a value, you can always write the result in text file, in your private data area, and have you wm app scrutinize this area on a timer to get it...

Not pretty, but it works
Re: [WM24] Trying to bridge with payment gateway
April 13, 2020 05:44PM
Hello Argus,

Thanks for the reply, I'll give this method a try, thanks!

Argus Wrote:
-------------------------------------------------------
> if you need to do things that aren't possible
> directly in wm java global procedure (callbacks,
> by example), you can try to proceed another way:
> - in an external tool (eclipse, android studio,
> etc), you create a JAR that does what you need
> - you insert that jar in your wm app, and call it
> from there
>
> of course, the trick is to deport all things that
> cannot work in wm inside the jar itself, and to
> put in place a communication system between the
> jar and the wm app
>
> In some case, you can just return a value, in
> others, when there is a callback and you can't
> just send back a value, you can always write the
> result in text file, in your private data area,
> and have you wm app scrutinize this area on a
> timer to get it...
>
> Not pretty, but it works
Re: [WM24] Trying to bridge with payment gateway
April 14, 2020 12:13PM
Hello Argus,

I tried this method however I got an error message that said;

System error sending HTTP Request.
Details of system error tongue sticking out smileyrotocol not supported

any ideas?
as we know that http is supported in android, it must be a permission issue...
I SUPPOSE that the httprequest is made in your jar...
If that is the case, then the problem is probably that you didn't add the matching permission request in your wm app, so your app is not authorized to do httprequest, and you have this message... So add the permission (or do a httprequest in your wm app, so that wm adds the permission automatically)
Re: [WM24] Trying to bridge with payment gateway
April 16, 2020 04:12AM
I don't think it may be caused by a permissions issue, at least I am not sure if that's the case because the HTTPrequest is coded in the WM app, even after adding permission; android.permission.INTERNET the error still appears

Snippet of the code I used:

ResStart is string
ResStart = HTTPRequest("[www.windev.com"]winking smiley
IF ResStart = True THEN
ResCode is string = HTTPGetResult()
Info("HTML code: " + ResCode)
ResHeader is string = HTTPGetResult(httpHeader)
Info("Header: " + ResHeader)
ResCookie is string = HTTPGetResult(httpCookie)
Info("Cookie: " + ResCookie)
ELSE
Error(ErrorInfo())
END

Argus Wrote:
-------------------------------------------------------
> as we know that http is supported in android, it
> must be a permission issue...
> I SUPPOSE that the httprequest is made in your
> jar...
> If that is the case, then the problem is probably
> that you didn't add the matching permission
> request in your wm app, so your app is not
> authorized to do httprequest, and you have this
> message... So add the permission (or do a
> httprequest in your wm app, so that wm adds the
> permission automatically)



Edited 1 time(s). Last edit at 04/16/2020 04:17AM by RobertLeo.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: