NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - osquiabro

Pages: [1] 2 3 ... 45
1
work if  set  in settings in webserver ..

2
for me work, maybe try to set settings in webserver settings, example https://www.fecipur.org/UpdatePerfil?insert_btn=insert

NT 14.21

3
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

4
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

5
Web Server - Ask For Help / Re: Barcode Scanner
« 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

6
Web Server - Ask For Help / Re: disable moving columns
« on: May 07, 2024, 03:16:06 AM »
all settings is off in webserver and Browse procedure, but i saw if a setting in websever layout Method is Flexbox always generate a column resizing, in table mode not generate but in my case use Flexbox.

Attached example

7
Web Server - Ask For Help / Re: Barcode Scanner
« on: May 06, 2024, 03:22:20 PM »
but the same problem is in a primary domain https://istpr.com/qrcode, maybe  i think that the multisite is a problem, the other site https://fecipur.org/barcode is not multisite and work

8
Web Server - Ask For Help / Barcode Scanner
« on: May 06, 2024, 06:23:42 AM »
Why Barcode scanner don't with a sub domain? example

https://fecipur.istpr.com/barcode

and work in this domain

https://fecipur.org/barcode

i think that the problem is when app is multihost because i have a same problem with my primary domain

https://istpr.com/qrcode

NT 14.21

9
Web Server - Ask For Help / disable moving columns
« on: May 06, 2024, 05:12:00 AM »
Hi Bruce, how i can disable moving columns in Browse? is confuse for a users, example of problem is in

https://www.fecipur.org/Finanzas

NT 14.21

10
i have a client in one laptop with this problem.

11
for me is working with ipad and iphone 14 pro max, NT 14.21, safari and google

https://istpr.com

12
for mobile or web is more simple create a buttons in memory form and in custom.css for responsive button

.NavigateMenu {
  background-color: whitesmoke;
  color: black;
  padding: 14px 20px;
  margin: 8px 0;
  cursor: pointer;
  width: 100%;
  opacity: 0.9;
  border-radius: inherit;
  display: block;
  font-size: x-large;
  height: auto;
  background-image: none;
  --bs-border-opacity: 1;
  border-color: black;
  border-radius: unset;
}

13
Web Server - Ask For Help / Clarionlive not secure
« on: April 05, 2024, 05:36:54 AM »
Bruce check your certificate for clarionlive

14
Web Server - Ask For Help / Re: Webcam broken in 14.03??
« on: March 25, 2024, 03:20:43 AM »
thanks for information

15
Web Server - Ask For Help / Re: Webcam broken in 14.03??
« on: March 23, 2024, 03:54:20 AM »
but why work at localhost without SSL?

Pages: [1] 2 3 ... 45