This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csharp try{ | |
PrcSaveLog.Call('ANNAINTEGRATIONLOG','',&Pgmname+ ' / "CALLBACK"') | |
&AuxVar = &HttpRequest.GetVariable(!"CALLBACK") | |
&CallBackCollection.FromJson(&AuxVar) | |
if &CallBackCollection.Count = 0 | |
&Ret = format(!'%1: CallBackCollection não foi recebido (&AuxVar= %2)', &Pgmname, &AuxVar) | |
PrcSaveLog.Call('ANNAINTEGRATIONLOG','',&Pgmname+ ' / '+&Ret) | |
else | |
for &CallBack in &CallBackCollection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm(in:&InInputString, out:&Key); | |
&InputString = &InInputString.TrimStart().TrimEnd() | |
csharp byte[/**/] bin = System.Text.Encoding.UTF8.GetBytes( [!&InputString!]); | |
csharp System.Security.Cryptography.HashAlgorithm alg = new System.Security.Cryptography.SHA1CryptoServiceProvider(); | |
csharp [!&Key!] = System.Convert.ToBase64String(alg.ComputeHash(bin)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm(In:&Text, In:&Key, In:&IV, Out:&OutText); | |
//Decrypted using the TripleDES algorithm using CBC mode (Cipher Block Chaining). | |
&CryptoEncrypt.Algorithm = CryptoEncryptAlgorithm.TripleDES | |
&CryptoEncrypt.Key = &Key | |
&CryptoEncrypt.IV = &IV | |
&OutText = &CryptoEncrypt.Decrypt(&Text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm(In:&Text, In:&Key, In:&IV, Out:&OutText); | |
//Encrypted using the TripleDES algorithm using CBC mode (Cipher Block Chaining). | |
&CryptoEncrypt.Algorithm = CryptoEncryptAlgorithm.TripleDES | |
&CryptoEncrypt.Key = &Key | |
&CryptoEncrypt.IV = &IV | |
&OutText = &CryptoEncrypt.Encrypt(&Text) //The text is encrypted and the result obtained. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parm(out:&CallHash); | |
&Agora = now() | |
&AgoraStr = &Agora.Year().ToString().Trim() | |
&AgoraStr += substr(trim(str(&Agora.Month() + 100)),2,2) | |
&AgoraStr += substr(trim(str(&Agora.Day() + 100)),2,2) | |
&AgoraStr += substr(trim(str(&Agora.Hour() + 100)),2,2) | |
&AgoraStr += substr(trim(str(&Agora.Minute() + 100)),2,2) | |
&AgoraStr += substr(trim(str(&Agora.Second() + 100)),2,2) | |
&RandomStr = trim(str(int(Random()*9))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm(In: &Json, In: &EncKEY, In: &DecKEY, In: &IV, Out: &StringResponse); | |
&CryptoEncrypt = new() | |
&CryptoEncrypt.Algorithm = CryptoEncryptAlgorithm.TripleDES | |
&Result = &CryptoEncrypt.Encrypt(!'DUMMY') | |
&NewIV = &CryptoEncrypt.IV | |
&NewIVCript = PrcEncryptTripleDES.Udp(&NewIV, &DecKEY, &IV ) | |
&StringResponse = PrcEncryptTripleDES.Udp(&Json, &EncKEY, &NewIV) + &IV + &NewIVCript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm(in:&LogType,in:&LogUser,in:&LogDescription); | |
New | |
LogType = &LogType | |
LogUser = &LogUser | |
LogDescription = &LogDescription | |
LogDate = now() | |
endnew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm(in:&CallHash,in:&SdtMacroAnswers,in:&UserCelphone,inout:&Place,inout:&NextPlace,in:&Provider,out:&WSPlace,out:&SdtWSContainers); | |
&SdtWSContainers = new() | |
&SdtWSContainers.ClientStatus = !'OK' | |
do case | |
case &Place.ToUpper() = 'QUESTIONS' | |
//Chamo a sub com a pergunta 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parm( | |
in:&WSPlace, | |
inout:&NextPlace, | |
inout:&Saudacao, | |
inout:&CallHash, | |
out:&SdtWSContainersContainer); | |
&LinkWSIntegracao = 'http://itda.com.br/mxns/aPrcWSAnnAMxns.aspx' | |
&LinkWSCallBack = 'http://itda.com.br/mxns/aPrcAnnACallBack.aspx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main Program: True | |
encryppt parameters: no | |
call protocol: HTTP | |
webservice | |
csharp try{ | |
PrcSaveLog.Call(!'ANNAINTEGRATIONLOG',&UserCelphone,&Pgmname+ !' / '+!'Entrou') | |
OlderNewer