[Logo] Spazio Aperto Banca Sella
[Register] Registrati   [Login] Login    
[Search] Ricerca   [Recent Topics] Argomenti Recenti   [Hottest Topics] Argomenti vivaci  
[Banner Pubblicitario]
adeguamento  XML
Indice dei Forum » GestPay Sviluppatori
Autore Messaggio
elong1961


Registrato: 29/12/2017 11:06:31
Messaggi: 3
Offline

Buongiorno e scusate ancora il disturbo.

Avrei bisogno di un grosso aiuto perchè sto vagando a vuoto da diversi giorni

avendo 2 tipi di incassi non riesco dove devo applicare i vostri suggerimenti.



1) primo punto

nel primo acquisto io utilizzo questo scripit in asp.

Cosa devo implementare in questo script per ottemperare alla nuova autenticazione o posso lasciare questo primo acquisto in questo modo?

shoplogin = "9097367" 'Mio codice
uiccode = "242" ' Euro
amount = Request.QueryString("userqt" 'importo
shoptransactionid = Request.QueryString("usercl" 'numero transazione
rictoken="MASKEDPAN"
URLWEBSERVICES = "https://ecomms2s.sella.it/gestpay/gestpayws/WSCryptDecrypt.asmx"

'XML data

XML_SendData = "<?xml version=""1.0"" encoding=""utf-8""?>"
XML_SendData = XML_SendData & "<soap12:Envelope xmlnssi=""http://www.w3.org/2001/XMLSchema-instance"" xmlnssd=""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>"& shoplogin &"</shopLogin>"
XML_SendData = XML_SendData & " <uicCode>"& uiccode &"</uicCode>"
XML_SendData = XML_SendData & " <amount>"& amount &"</amount>"
XML_SendData = XML_SendData & " <shopTransactionId>"&shoptransactionid &"</shopTransactionId>"
XML_SendData = XML_SendData & " <requestToken>"&rictoken&"</requestToken>"
XML_SendData = XML_SendData & " </Encrypt>"
XML_SendData = XML_SendData & " </soap12:Body>"
XML_SendData = XML_SendData & "</soap12:Envelope>"

'response.write server.HTMLEncode(XML_SendData)
'response.end


Set xmlHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0"
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument"
xmlHTTP.open "POST", URLWEBSERVICES, false
xmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8"
xmlHTTP.send XML_SendData
strStatus = xmlHTTP.Status
strRetval = xmlHTTP.responseText

if strStatus = "200" then
on error resume next
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
EncryptedString = xmlDoc.getElementsByTagName("CryptDecryptString".item(0).text
on error goto 0
else
%>
<h3>Impossibile procedere:</h3>
<%
response.write strStatus

response.end
end if

Set xmlHTTP = nothing
Set xmlDoc = nothing

if ErrorCode = 0 then
%>
<form action="https://ecomm.sella.it/pagam/pagam.aspx" method="post">

<input type="hidden" name="a" value="<%=shoplogin%>">
<input type="hidden" name="b" value="<%=EncryptedString%>">
<input type="submit" name="Submit" value="Accedi alla pagina di pagamento">
</form>

<script>
document.forms[0].submit();
</script>

<%else
%>
<h3>Errore:</h3>
<%
response.write "Codice errore: " & ErrorCode & "<br>"
response.write "Descrizione: " & ErrorDescription & "<br>"
end if
%>


2) Punto

nei pagamenti successivi io utilizzo il token e uso questo script :

cosa devo implementare?

Dim XML_SendData
Dim CryptString
Dim shoplogin
Dim uiccode
Dim amount
Dim URLWEBSERVICES
dim rictoken
dim name
dim email
dim rata
Dim FileObject
Dim mailbody
Dim Sql
Dim Rs
dim scaden
dim incasso,anno,mese,giorno

shoplogin = "9097367" '
uiccode = "242"
amount = Request.QueryString("importo"
shoptransactionid = Request.QueryString("cli"
rictoken=Request.QueryString("token"
name=Request.QueryString("cli"
email="elong@omnisolution.it"
rata=Request.QueryString("rata"
scaden=Request.QueryString("scade"
Anno = Mid(scaden, 7, 4)
Mese = Mid(scaden, 4, 2)
Giorno = Mid(scaden, 1, 2)
incasso = MESE & "/" & Giorno & "/" & Anno

URLWEBSERVICES = "https://ecommS2S.sella.it/gestpay/GestPayWS/WSs2s.asmx?WSDL"

'XML data

XML_SendData = "<?xml version=""1.0"" encoding=""utf-8""?>"
XML_SendData = XML_SendData & " <soap12:Envelope xmlnssi=""http://www.w3.org/2001/XMLSchema-instance"" xmlnssd=""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 & " <callPagamS2S xmlns=""https://ecomms2s.sella.it/"">"
XML_SendData = XML_SendData & " <shopLogin>"& shoplogin &"</shopLogin>"
XML_SendData = XML_SendData & " <uicCode>"& uiccode &"</uicCode>"
XML_SendData = XML_SendData & " <amount>"& amount &"</amount>"
XML_SendData = XML_SendData & " <shopTransactionId>"&shoptransactionid &"</shopTransactionId>"
XML_SendData = XML_SendData & " <tokenValue>"&rictoken&"</tokenValue>"
XML_SendData = XML_SendData & " <buyerName>"& name &"</buyerName>"
XML_SendData = XML_SendData & " <buyerEmail>"& email &"</buyerEmail>"
XML_SendData = XML_SendData & " </callPagamS2S>"
XML_SendData = XML_SendData & " </soap12:Body>"
XML_SendData = XML_SendData & " </soap12:Envelope>"



Set xmlHTTP = Server.CreateObject("Msxml2.XMLHTTP.3.0"
Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument"
xmlHTTP.open "POST", URLWEBSERVICES, false
xmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
xmlHTTP.setRequestHeader "SOAPAction", "https://ecomms2s.sella.it/callPagamS2S"
xmlHTTP.send XML_SendData


strStatus = xmlHTTP.Status
strRetval = xmlHTTP.responseText



if strStatus = "200" then
on error resume next
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
EncryptedString = xmlDoc.getElementsByTagName("CryptDecryptString".item(0).text
ShopTransactionID= xmlDoc.getElementsByTagName("ShopTransactionID".item(0).text
BankTransactionID= xmlDoc.getElementsByTagName("BankTransactionID".item(0).text
AuthorizationCode= xmlDoc.getElementsByTagName("AuthorizationCode".item(0).text
mCurrency= xmlDoc.getElementsByTagName("Currency".item(0).text
Amount= xmlDoc.getElementsByTagName("Amount".item(0).text
Country= xmlDoc.getElementsByTagName("Country".item(0).text
BuyerName= xmlDoc.getElementsByTagName("BuyerName".item(0).text
AlertCode= xmlDoc.getElementsByTagName("AlertCode".item(0).text
AlertDescription= xmlDoc.getElementsByTagName("AlertDescription".item(0).text
VbVRisp= xmlDoc.getElementsByTagName("VbVRisp".item(0).text
TDLevel = xmlDoc.getElementsByTagName("TDLevel".item(0).text
CustomInfo = xmlDoc.getElementsByTagName("customInfo".item(0).text
token=xmlDoc.getElementsByTagName("token".item(0).text
TransactionKey=xmlDoc.getElementsByTagName("TransactionKey".item(0).text
on error goto 0
else
%>
<h3>Errore:</h3>
<%
end if

response.write "TransactionType: " & TransactionType & "<br>"
response.write "TransactionResult: " & TransactionResult & "<br>"
response.write "ErrorCode: " & ErrorCode & "<br>"
response.write "ErrorDescription: " & ErrorDescription & "<br>"

if ErrorCode = 0 then
on error resume next
ShopTransactionID= xmlDoc.getElementsByTagName("ShopTransactionID".item(0).text
BankTransactionID= xmlDoc.getElementsByTagName("BankTransactionID".item(0).text
AuthorizationCode= xmlDoc.getElementsByTagName("AuthorizationCode".item(0).text
mCurrency= xmlDoc.getElementsByTagName("Currency".item(0).text
Amount= xmlDoc.getElementsByTagName("Amount".item(0).text
Country= xmlDoc.getElementsByTagName("Country".item(0).text
BuyerName= xmlDoc.getElementsByTagName("BuyerName".item(0).text
AlertCode= xmlDoc.getElementsByTagName("AlertCode".item(0).text
AlertDescription= xmlDoc.getElementsByTagName("AlertDescription".item(0).text
VbVRisp= xmlDoc.getElementsByTagName("VbVRisp".item(0).text
TDLevel = xmlDoc.getElementsByTagName("TDLevel".item(0).text
CustomInfo = xmlDoc.getElementsByTagName("customInfo".item(0).text
token=xmlDoc.getElementsByTagName("token".item(0).text
TransactionKey=xmlDoc.getElementsByTagName("TransactionKey".item(0).text

on error goto 0
end if


response.write "TransactionType: " & TransactionType & "<br>"
response.write "TransactionKey: " & TransactionKey & "<br>"
response.write "TransactionResult: " & TransactionResult & "<br>"
response.write "ShopTransactionID: " & ShopTransactionID & "<br>"
response.write "BankTransactionID: " & BankTransactionID & "<br>"
response.write "AuthorizationCode: " & AuthorizationCode & "<br>"
response.write "Currency: " & mCurrency & "<br>"
response.write "Amount: " & Amount & "<br>"
response.write "Country: " & Country & "<br>"
response.write "BuyerName: " & BuyerName & "<br>"
response.write "ErrorCode: " & ErrorCode & "<br>"
response.write "ErrorDescription: " & ErrorDescription & "<br>"
response.write "AlertCode: " & AlertCode & "<br>"
response.write "AlertDescription: " & AlertDescription & "<br>"
response.write "VbVRisp: " & VbVRisp & "<br>"
response.write "TDLevel: " & TDLevel & "<br>"
response.write "Token: " & token & "<br>"
if TransactionResult="OK" then
mailbody=ShopTransactionID+" rata "+rata+" Importo "+amount+" scadenza "+incasso
---cerco nel database la scheda del cliente la rata da incassare
response.write sql
Set RS = Conn.Execute(SQL)
if Not RS.EOF then
--- inserisco i riferimenti del pagamento

Set RS = Conn.Execute(SQL)
else
end if
else
mailbody="Incasso Fallito"+ShopTransactionID+" rata "+rata+" Importo "+amount+" scadenza "+incasso

end if
%>
<br>
<!--#include file="posta2.asp"-->
<br>
<%
Set xmlHTTP = nothing
Set xmlDoc = nothing
cristina.rogatti


Registrato: 24/01/2018 17:15:49
Messaggi: 82
Offline

Ciao elong1961,

per ricevere aiuto ti chiediamo gentilmente di contattarci direttamente alla nostra Assistenza GestPay al n. 015.24.34.640 (da fisso) oppure al n. +39-015.24.34.640 (dall'estero e da cellulare), da lunedì a venerdì, in orario 08.00 - 13.00 e 14.30 - 18.00.
In alternativa, puoi scriverci agli indirizzi: ecommerce@sella.it (per esercenti) oppure assistenza_ecommerce@sella.it (per acquirenti).
Buon pomeriggio


Cristina - Team Sella
 
Indice dei Forum » GestPay Sviluppatori
Vai a:   
E.t.v.s.p.b WLS11G