NetTalk Central

Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
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
22
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?)
23
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
24
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)
25
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
26
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
27
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
28
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

 
29
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




30
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.
Pages: 1 2 [3] 4 5 ... 10