Visualizzazione dei risultati da 1 a 10 su 22

Hybrid View

  1. #1
    Utente di HTML.it L'avatar di vic53
    Registrato dal
    Oct 2010
    residenza
    Fonte Nuova (Roma)
    Messaggi
    592

    verifica campo tot

    Quote Originariamente inviata da ghis65 Visualizza il messaggio
    Buongiorno
    sto implementando Gestapay sul mio sito
    Ho inserito i parametri richiesti per fare un test con account prova
    ma mi da errore questo è lo script
    codice:
    <%
    Dim XML_SendData
    Dim CryptString
    
    'XML data
    'all the commented nodes are optional, remove the comments if you need to send those 
    
    XML_SendData = "<?xml version=""1.0"" encoding=""utf-8""?>"
    XML_SendData = XML_SendData & "<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">"
    XML_SendData = XML_SendData & " <soap12:Body>"
    XML_SendData = XML_SendData & " <Encrypt xmlns=""https://ecomm.sella.it/"">"
    XML_SendData = XML_SendData & " <shopLogin>GESPAY12345</shopLogin>" 'your Merchant code ex. GesPayXXXXXXX 
    XML_SendData = XML_SendData & " <uicCode>242/uicCode>" 'Currency code ex. 242 for Euro 
    XML_SendData = XML_SendData & " <amount><'%=tot%'></amount>" 'the amount ex. 0.05 
    'XML_SendData = XML_SendData & " <shopTransactionId>string</shopTransactionId>" 'your ShopTransactionID 
    'XML_SendData = XML_SendData & " <cardNumber>string</cardNumber>"
    'XML_SendData = XML_SendData & " <expiryMonth>string</expiryMonth>"
    'XML_SendData = XML_SendData & " <expiryYear>string</expiryYear>"
    'XML_SendData = XML_SendData & " <buyerName>string</buyerName>"
    'XML_SendData = XML_SendData & " <buyerEmail>string</buyerEmail>"
    'XML_SendData = XML_SendData & " <languageId>string</languageId>"
    'XML_SendData = XML_SendData & " <cvv>string</cvv>"
    'XML_SendData = XML_SendData & " <customInfo>string</customInfo>"
    XML_SendData = XML_SendData & " </Encrypt>"
    XML_SendData = XML_SendData & " </soap12:Body>"
    XML_SendData = XML_SendData & "</soap12:Envelope>"
    
    
    
    
    Set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
    Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
    'Production code
    xmlHTTP.open "POST", "https://testecomm.sella.it/gestpay/gestpayws/WSCryptDecrypt.asmx", false 
    xmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8"
    xmlHTTP.send XML_SendData
    
    
    strStatus = xmlHTTP.Status
    strRetval = xmlHTTP.responseText
    
    xmlDoc.loadxml(xmlHTTP.responseText)
    TransactionType= xmlDoc.getElementsByTagName("TransactionType").item(0).text
    TransactionResult= xmlDoc.getElementsByTagName("TransactionResult").item(0).text
    ErrorCode= xmlDoc.getElementsByTagName("ErrorCode").item(0).text
    ErrorDescription= xmlDoc.getElementsByTagName("ErrorDescription").item(0).text
    if ErrorCode = 0 then
    EncryptedString = xmlDoc.getElementsByTagName("CryptDecryptString").item(0).text
    end if 
    
    
    Set xmlHTTP = nothing
    Set xmlDoc = nothing
    
    
    if ErrorCode = 0 then
    %>
    
    <form action="https://testecomm.sella.it/gestpay/Pagam.asp">
    <!   for test codes change action to testecomm.sella.it  >
    <input type="hidden" name="a" value="<=GESPAY12345>"> <input type="hidden" name="b" value="<%=EncryptedString%>"> <input type="submit" name="Submit" value="Accedi alla pagina di pagamento"> </form> <%else %> <h3>An Error has occurred:</h3> <% response.write "ErrorCode: " & ErrorCode & "<br>"
    response.write "ErrorDescription: " & ErrorDescription & "<br>"
    end if%> 
    
    
    decryp
    
    <%
    
    
    'Decript
    
    
    Dim EncString 
    
    
    'Encrypted string to decrypt
    
    
    EncString = request("b")
    ShopLogin = request("a")
    
    
    'Decript
    questo è l'errore
    Microsoft VBScript runtime error '800a01a8'
    Object required: 'xmlDoc.getElementsByTagName(...).item(...)'
    /esempio.asp, line 42

    questa è òa stringa
    TransactionType= xmlDoc.getElementsByTagName("TransactionType").ite m(0).text

    Grazie
    non conosco gestapay ma controlla la riga
    codice:
    <amount><'%=tot%'></amount>" 'the amount ex. 0.05  
    ...     '<%=tot%>'</amount>
    Vic53

  2. #2
    Utente di HTML.it
    Registrato dal
    Feb 2014
    Messaggi
    47
    Grazie vic53
    se modifico come hai indicato mi dà questo errore
    codice:
    Microsoft VBScript compilation  error '800a0409' 
     Unterminated string constant 
     /esempio.asp, line 14 
    XML_SendData = XML_SendData & " <amount>'<%=tot
    -----------------------------------------------^t
    lasciandolo come prima mi continua a dare questo errore e non capisco come risolverlo.
    se hai idee al riguardo.
    codice:
    Microsoft VBScript runtime  error '800a01a8' 
     Object required: 'xmlDoc.getElementsByTagName(...).item(...)' 
     /esempio.asp, line 42
    
    questa è la stringa
    TransactionType= xmlDoc.getElementsByTagName("TransactionType").ite  m(0).text
    Quote Originariamente inviata da vic53 Visualizza il messaggio
    non conosco gestapay ma controlla la riga
    codice:
    <amount><'%=tot%'></amount>" 'the amount ex. 0.05  
    ...     '<%=tot%>'</amount>
    Ultima modifica di ghis65; 24-11-2017 a 14:33

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.