21
Web Server - Ask For Help / Re: Serving a HELP file for my Web APP
« Last post by rjolda on May 10, 2024, 03:33:59 PM »Hi,
Found that having the base page named "Index.htm' did not work well. Re-named it to "index2.htm' and I got it to work under the web folder. However, I am going to try to get it to serve out of its own folder under web\eppilihelp
At least I am getting somewhere.
Ron
Found that having the base page named "Index.htm' did not work well. Re-named it to "index2.htm' and I got it to work under the web folder. However, I am going to try to get it to serve out of its own folder under web\eppilihelp
At least I am getting somewhere.
Ron
22
Web Server - Ask For Help / Form Layout Tab Suppress Comments setting not respected?
« Last post by Jane on May 10, 2024, 03:22:28 PM »14.21.
If I go to the Layout tab on a form and set Suppress Comments to Yes, the comments divs are still generated on the form.
That doesn't seem right?
Modified example of Web71 attached. I copied the Customers browse and update form. On the duplicate form I manually suppressed comments on each field. On the original form I just set the item on the Layout tab to Yes.
If I go to the Layout tab on a form and set Suppress Comments to Yes, the comments divs are still generated on the form.
That doesn't seem right?
Modified example of Web71 attached. I copied the Customers browse and update form. On the duplicate form I manually suppressed comments on each field. On the original form I just set the item on the Layout tab to Yes.
23
Web Server - Ask For Help / Re: Serving a HELP file for my Web APP
« Last post by rjolda on May 10, 2024, 03:22:10 PM »Hi Jane,
Yes, I can open the Help file with browser. It is there and in the correct place. Seems like I don't have the NetTalk reference correct with paths, etc.
Ron
Yes, I can open the Help file with browser. It is there and in the correct place. Seems like I don't have the NetTalk reference correct with paths, etc.
Ron
24
Web Server - Ask For Help / Re: Serving a HELP file for my Web APP
« Last post by Jane on May 10, 2024, 02:36:02 PM »Can you open the help by entering its URL directly in the web browser?
I'd poke around with that until you find what's wrong. (i.e., can you open an image by typing in its path name? a css file? anything within your EPPILIHELP folder?)
I'd poke around with that until you find what's wrong. (i.e., can you open an image by typing in its path name? a css file? anything within your EPPILIHELP folder?)
25
Web Server - Ask For Help / Re: Serving a HELP file for my Web APP
« Last post by rjolda on May 10, 2024, 01:40:30 PM »Hi,
Typos in Post. URL is correct in my APP and the post should have said :
I put a Menu Item called "HELP" which On CLick opens the URL: '/EPPILIHelp/Index.htm'
Fat fingers....
Ron
Typos in Post. URL is correct in my APP and the post should have said :
I put a Menu Item called "HELP" which On CLick opens the URL: '/EPPILIHelp/Index.htm'
Fat fingers....
Ron
26
Web Server - Ask For Help / Re: Serving a HELP file for my Web APP
« Last post by Jane on May 10, 2024, 01:14:56 PM »I assume the typos are just in your post and not in the URL? (eppiL/eppiP)
27
Web Server - Ask For Help / Serving a HELP file for my Web APP
« Last post by rjolda on May 10, 2024, 01:12:51 PM »Hi,
NT 14.21 C 11.0.136
I wrote a Help manual in HTML in Dr Explain. Now, I want to have my users be able to open it. However, I can't get it to work.
My HELP file is in the folder EPPILIHELP which is under the web folder for my APP. WIthin the EPPILIHELP folder is an Index.htm page which is the root for all of the HTML HELP files.
I put a Menu Item called "HELP" which On CLick opens the URL: '/EPPIPIHelp/Index.htm'
However, the APP says that the file cannot be found. I tried lots of permuatations of folder and name combos - no working. Target fra,e is '_blank'.
What is the proper way to call my help file?
Thanks,
Ron
NT 14.21 C 11.0.136
I wrote a Help manual in HTML in Dr Explain. Now, I want to have my users be able to open it. However, I can't get it to work.
My HELP file is in the folder EPPILIHELP which is under the web folder for my APP. WIthin the EPPILIHELP folder is an Index.htm page which is the root for all of the HTML HELP files.
I put a Menu Item called "HELP" which On CLick opens the URL: '/EPPIPIHelp/Index.htm'
However, the APP says that the file cannot be found. I tried lots of permuatations of folder and name combos - no working. Target fra,e is '_blank'.
What is the proper way to call my help file?
Thanks,
Ron
28
Web Server - Ask For Help / Re: Redirect URL received after POST, how to handle (YOCO)
« Last post by Alberto on May 10, 2024, 05:18:16 AM »JohanR,
I would call the NtWebClient before the memory form call, if you call it in the generate form it will be called many times.
And you can use a media field in the memory form to include the CC form (using its url) in your page.
Hope this helps
I would call the NtWebClient before the memory form call, if you call it in the generate form it will be called many times.
And you can use a media field in the memory form to include the CC form (using its url) in your page.
Hope this helps
29
Web Server - Ask For Help / Re: Redirect URL received after POST, how to handle (YOCO)
« Last post by osquiabro on May 10, 2024, 04:35:51 AM »is the correct way, this is an example for the old Stripe API, the new API is a little more difficult, but the Yoco API is similar to the old Stripe API, you can convert this code to NT curl and avoid using NetWebClient. By the way, I never used nt curl but I think it's similar to Mike Duglas' curl
SendRequest ROUTINE
DATA
curl TCurlHttpClass
res CURLcode
qIndex LONG, AUTO
respBuffer STRING(65000) !big enuff to hold received response
CODE
curl.Init()
curl.FreeHttpHeaders()
SSLInfo:bUseSSL = TRUE
p_web.ssv('PaymentFrom','Afiliacion')
IF SSLInfo:bUseSSL
res = curl.SetSSLVerifyHost(SSLInfo:bVerifyHost)
IF res <> CURLE_OK
END
res = curl.SetSSLVerifyPeer(SSLInfo:bVerifyPeer)
IF res <> CURLE_OK
END
res = curl.SetSSLVersion(SSLInfo:Version)
IF res <> CURLE_OK
END
IF SSLInfo:Certificate
res = curl.SetCAInfo(SSLInfo:Certificate)
IF res <> CURLE_OK
END
END
END
curl.SetCustomRequest('POST')
!-H "Content-Type: application/json"
!-H "Authorization: Bearer Access-Token"
CASE p_Web.gsv('Com:PaymentEnviroment')
OF 'sandbox'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteSandBoxToken'))
OF 'production'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteProductionToken'))
END
!-- applies http headers added by AddHttpHeader calls
curl.SetHttpHeaders()
!----Create a Token --------!
Send:Url = 'https://api.stripe.com/v1/tokens'
Send:PostParams ='card[number]='&p_web.gsv('CardNumber')&'&card[exp_month]='&p_web.GSV('ExpMonth')&'&card[exp_year]='&p_web.GSV('ExpYear')&'&card[cvc]='&p_web.GSV('Cvv')
!----Create a Token -------!
CLEAR(TokenError)
CLEAR(Token)
res = curl.SendRequestStr(Send:Url, Send:PostParams, respBuffer)
Loc:CantidadaPagarSend = p_web.gsv('Loc:CantidadaPagar')*100
IF res = CURLE_OK
jsonStr = CLIP(respBuffer)
DO ParseJSON
IF Token<>'' AND TokenError=''
CLEAR(pJsonString)
curl.FreeHttpHeaders()
curl.SetCustomRequest('POST')
CASE p_web.gsv('Com:PaymentEnviroment')
OF 'sandbox'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteSandBoxToken'))
OF 'production'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteProductionToken'))
END
curl.SetHttpHeaders()
Send:Url = 'https://api.stripe.com/v1/charges'
Send:PostParams ='currency=usd&amount='&p_web.gsv('Loc:CantidadaPagar')*100&'&description=charge&source='&clip(Token)&'&receipt_email='&p_web.gsv('Use:EMAIL')&'&metadata[afiliacionid]='&p_web.gsv('AfiliacionId')
res = curl.SendRequestStr(Send:Url, Send:PostParams, respBuffer)
IF res = CURLE_OK
pJsonString = CLIP(respBuffer)
DO ParseJSON2
IF TokenError<>''
loc:alert = TokenError
p_web.SetValue('SelectField','CardNumber')
EXIT
END
Loc:Status=1
DO AddPayment
do Refresh::b1
DO SendEmail
p_web.Script( p_web.WindowOpen( 'PaymentSucessfull' ))
END
ELSE
loc:alert = CLIP(TokenError)
p_web.SetValue('SelectField','NameonCard')
EXIT
END
ELSIF res = -1
loc:alert = 'Cannot open local file Contact System Administrator'
p_web.SetValue('SelectField','NameonCard')
ELSE
loc:alert = 'SendRequest failed2: '& curl.StrError(res)&' Contact System Administrator'
p_web.SetValue('SelectField','NameonCard')
END
SendRequest ROUTINE
DATA
curl TCurlHttpClass
res CURLcode
qIndex LONG, AUTO
respBuffer STRING(65000) !big enuff to hold received response
CODE
curl.Init()
curl.FreeHttpHeaders()
SSLInfo:bUseSSL = TRUE
p_web.ssv('PaymentFrom','Afiliacion')
IF SSLInfo:bUseSSL
res = curl.SetSSLVerifyHost(SSLInfo:bVerifyHost)
IF res <> CURLE_OK
END
res = curl.SetSSLVerifyPeer(SSLInfo:bVerifyPeer)
IF res <> CURLE_OK
END
res = curl.SetSSLVersion(SSLInfo:Version)
IF res <> CURLE_OK
END
IF SSLInfo:Certificate
res = curl.SetCAInfo(SSLInfo:Certificate)
IF res <> CURLE_OK
END
END
END
curl.SetCustomRequest('POST')
!-H "Content-Type: application/json"
!-H "Authorization: Bearer Access-Token"
CASE p_Web.gsv('Com:PaymentEnviroment')
OF 'sandbox'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteSandBoxToken'))
OF 'production'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteProductionToken'))
END
!-- applies http headers added by AddHttpHeader calls
curl.SetHttpHeaders()
!----Create a Token --------!
Send:Url = 'https://api.stripe.com/v1/tokens'
Send:PostParams ='card[number]='&p_web.gsv('CardNumber')&'&card[exp_month]='&p_web.GSV('ExpMonth')&'&card[exp_year]='&p_web.GSV('ExpYear')&'&card[cvc]='&p_web.GSV('Cvv')
!----Create a Token -------!
CLEAR(TokenError)
CLEAR(Token)
res = curl.SendRequestStr(Send:Url, Send:PostParams, respBuffer)
Loc:CantidadaPagarSend = p_web.gsv('Loc:CantidadaPagar')*100
IF res = CURLE_OK
jsonStr = CLIP(respBuffer)
DO ParseJSON
IF Token<>'' AND TokenError=''
CLEAR(pJsonString)
curl.FreeHttpHeaders()
curl.SetCustomRequest('POST')
CASE p_web.gsv('Com:PaymentEnviroment')
OF 'sandbox'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteSandBoxToken'))
OF 'production'
curl.AddHttpHeader('Authorization: Bearer '&p_web.gsv('Com:StripteProductionToken'))
END
curl.SetHttpHeaders()
Send:Url = 'https://api.stripe.com/v1/charges'
Send:PostParams ='currency=usd&amount='&p_web.gsv('Loc:CantidadaPagar')*100&'&description=charge&source='&clip(Token)&'&receipt_email='&p_web.gsv('Use:EMAIL')&'&metadata[afiliacionid]='&p_web.gsv('AfiliacionId')
res = curl.SendRequestStr(Send:Url, Send:PostParams, respBuffer)
IF res = CURLE_OK
pJsonString = CLIP(respBuffer)
DO ParseJSON2
IF TokenError<>''
loc:alert = TokenError
p_web.SetValue('SelectField','CardNumber')
EXIT
END
Loc:Status=1
DO AddPayment
do Refresh::b1
DO SendEmail
p_web.Script( p_web.WindowOpen( 'PaymentSucessfull' ))
END
ELSE
loc:alert = CLIP(TokenError)
p_web.SetValue('SelectField','NameonCard')
EXIT
END
ELSIF res = -1
loc:alert = 'Cannot open local file Contact System Administrator'
p_web.SetValue('SelectField','NameonCard')
ELSE
loc:alert = 'SendRequest failed2: '& curl.StrError(res)&' Contact System Administrator'
p_web.SetValue('SelectField','NameonCard')
END
30
Web Server - Ask For Help / Re: Redirect URL received after POST, how to handle (YOCO)
« Last post by JohanR on May 10, 2024, 03:55:17 AM »Hi,
Plan I'm going with, if I missing the obvious let me know.
Memory NetWebform
In the generate form , call a hidden NetWebClient procedure that handles the POST and return URL to NetWebForm
On the NetWebform, display fields for confirmation and a PAY button with the URL returned by the NetWebClient
If client clicks the button, then they will redirected to the CC Payment page
If there are other ways to handle this, please let me know
Johan
Plan I'm going with, if I missing the obvious let me know.
Memory NetWebform
In the generate form , call a hidden NetWebClient procedure that handles the POST and return URL to NetWebForm
On the NetWebform, display fields for confirmation and a PAY button with the URL returned by the NetWebClient
If client clicks the button, then they will redirected to the CC Payment page
If there are other ways to handle this, please let me know
Johan