NetTalk Central

Recent Posts

Pages: [1] 2 3 ... 10
1
Web Server - Ask For Help / Re: Serving a HELP file for my Web APP
« Last post by Jane on Today at 01:14:56 PM »
I assume the typos are just in your post and not in the URL?  (eppiL/eppiP)
2
Web Server - Ask For Help / Serving a HELP file for my Web APP
« Last post by rjolda on Today at 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
3
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
4
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
5
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

 
6
Hi,

I am currently trying to implement a new secure credit card payment system, YOCO

It's a 2 step process, initiated by a POST, with the bearer security, amount, currency and then on the success of the POST,
one of the return data fields is a redirect URL ,
which I must direct the user to.
This redirected URL is a page on the providor site, where the user will enter CC, Expiry etc,
on success/fail/cancel , one of my URL will be called


Question is how to handle the re-direct after the receipt of the successful POST?


TIA for any info

Johan




7
The Rest - Ask For Help / NetTalk - NetWebClient and NetOAuth
« Last post by aflewel1 on May 09, 2024, 12:04:36 PM »
Hi all!

Topic - NetWebClient and NetOauth

I have a program making calls to various API endpoints, all functioning correctly/acceptably. Now, I'm trying to retrieve tweets from Twitter. I have a developer's account and basic subscription access. I'm new to using Oauth1 for authentication. I've set statements up in Insomnia and am successfully retrieving tweets and other data. However, transitioning this all to Clarion is (for me) challenging with respect to Oauth1 (which I want to continue with for authentication).

I've shared screenshots here of the Insomnia GET request with some data obscured to demonstrate successful data retrieval. There's a screenshot of Clarion showing the code where I've populated oauth parameters.  This area confuses me. I'm essentially fumbling with the oauth aspect.

I've also included a screenshot of the textual data returned.

Any feedback, guidance, or direction that could help get this ironed out would be greatly appreciated. While oauth is daunting for me, I'm hopeful someone can see where I'm off track.
8
This is in a multihost app

This program has performed an illegal operation and will now be restarted.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Program : C:\Apps\IstprHost\IstprHost.exe
Version :
At : 17:06:55 on 2024/05/08
Workstation: : istpr
User Name: : Administrator
Reported error : EXCEPTION_ACCESS_VIOLATION - Error reading data at : 20202244h
Windows : Win 10 - 10.0.20348
Clarion : 0.9
Thread : 4    Field : 0    Event : 0    Keycode : 0
Error at address : 00FA0537h  Line=3047  Proc=PROCESSREQUEST@F22NETWEBSERVERWORKERBASEsb  Src=NetWeb.Clw
Stack Trace
??? 0105B9D4h    Line ?=135    no proc       Src=xFiles.clw
[01] 00EC623Bh    Line=66       Proc=WEBHANDLER@Fsb  Src=IstprHost030.clw
[02] 7410E2FFh    no line number    no proc       Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 74188C14h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7416940Ah    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
[03] 7410DDF1h    no line number    no proc       Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 74169420h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 74188C14h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 74188C94h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7417D1D8h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7417D1ECh    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7417D208h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7417D1FCh    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7417D224h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
??? 7417D218h    Line ?=47    no proc       Src=wxeh.cpp    Module=C:\Apps\IstprHost\ClaRUN.dll 11.0.13630
[04] 77C97F4Dh    no debug info, Module=C:\Windows\SYSTEM32\ntdll.dll 10.0.20348.2340 (WinBuild.160101.0800)
[05] 77C97F1Bh    no debug info, Module=C:\Windows\SYSTEM32\ntdll.dll 10.0.20348.2340 (WinBuild.160101.0800)

Line=3047 in Netweb.clw NT 14.21

loop x = 1 to self.RequestData.DataStringTheory.records()
      self.SessionId = self.RequestData.DataStringTheory.getline(x) !self.RequestData.SessionId
      if self.SessionId <> ''
        ! test for web socket connections before deleting the session.
        if not self.webserver &= null and not self.webserver.WebSocketServer &= null and |
               self.webserver.WebSocketServer.IsWebSocketSession(self.SessionId) = 0
          self.NotifyDeleteSession()
          self.DeleteSession()
        else
          self.TouchSession()
        End
      End
    end

in xfile 4.31 line 135

xFileBase.Construct  PROCEDURE
  CODE
9
Web Server - Ask For Help / Re: Webcam(79) example, give error with iPhone
« Last post by Robert Iliuta on May 08, 2024, 01:42:33 AM »
Hallo Bruce,

>>yes, that tells you an error exists.
>>Now open the console in your Browser (F12) and see what the error actually is....

I can see that an error exits, but.. how can I do this (F12) on iPhone? on browser I know but on iPhone?

On my laptop (windows11) it works fine but on my iPhone no.
Please can you test and confirm it works on iPhone?
10
Web Server - Ask For Help / Re: Barcode Scanner
« Last post by osquiabro on May 07, 2024, 03:19:19 AM »
I can't believe that was the problem, but it was a copy from the other server where it does work or there was something in the cache because after ctrl-f5 it worked...

Seanh, thanks for the suggestion
Pages: [1] 2 3 ... 10