Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Public Delegate Sub Action(Of T) (obj As T) Pin
Richard MacCutchan30-Jun-15 21:21
mveRichard MacCutchan30-Jun-15 21:21 
QuestionFirstData G4 V14 HMAC Header Pin
jkirkerx29-Jun-15 13:47
professionaljkirkerx29-Jun-15 13:47 
AnswerRe: FirstData G4 V14 HMAC Header Pin
Jörgen Andersson29-Jun-15 20:17
professionalJörgen Andersson29-Jun-15 20:17 
GeneralRe: FirstData G4 V14 HMAC Header Pin
jkirkerx30-Jun-15 6:49
professionaljkirkerx30-Jun-15 6:49 
GeneralConclusion - XMLWriter, UTF16 and XML empty element short form. Pin
jkirkerx5-Jul-15 8:54
professionaljkirkerx5-Jul-15 8:54 
AnswerRe: FirstData G4 V14 HMAC Header - Issue 1: Pin
jkirkerx30-Jun-15 11:10
professionaljkirkerx30-Jun-15 11:10 
GeneralUpdate - got the calc to work now with the request message Pin
jkirkerx1-Jul-15 7:38
professionaljkirkerx1-Jul-15 7:38 
AnswerCan't get the hashed content right Pin
jkirkerx1-Jul-15 12:39
professionaljkirkerx1-Jul-15 12:39 
I just can't the hashed content right here. So the first request is what's in StringBullder, and the 2nd request is what's was transmitted to the service
Now I can see there's a difference, but not sure if which direction to go.
I tried just getting the body and hashing, but was off.

This is what I hash against
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><q1:SendAndCommit xmlns:q1="http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/Request"><SendAndCommitSource href="#id1"/></q1:SendAndCommit><q2:Transaction id="id1" xsi:type="q2:Transaction" xmlns:q2="http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes"><ExactID xsi:type="xsd:string">AH2824-05</ExactID><Password xsi:type="xsd:string">0g4tu7pj1hb88q5d8xa55dlhvhvwlm3r</Password><Transaction_Type xsi:type="xsd:string">00</Transaction_Type><DollarAmount xsi:type="xsd:string">99.20</DollarAmount><Card_Number xsi:type="xsd:string">4111111111111111</Card_Number><Expiry_Date xsi:type="xsd:string">1215</Expiry_Date><CardHoldersName xsi:type="xsd:string">Jim Kirker</CardHoldersName><CVDCode xsi:type="xsd:string">999</CVDCode><Reference_No xsi:type="xsd:string">CA-Test</Reference_No><Client_IP xsi:type="xsd:string">::1</Client_IP><Client_Email xsi:type="xsd:string">jkirkerx@gmail.com</Client_Email><Currency xsi:type="xsd:string">USD</Currency><Address href="#id2"/></q2:Transaction><q3:Address_Type id="id2" xsi:type="q3:Address_Type" xmlns:q3="http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes"><Address1 xsi:type="xsd:string">18751 Park Haven Lane</Address1><Address2 xsi:type="xsd:string"></Address2><City xsi:type="xsd:string">Huntington Beach</City><State xsi:type="xsd:string">CA</State><Zip xsi:type="xsd:string">92648</Zip><CountryCode xsi:type="xsd:string">US</CountryCode></q3:Address_Type></s:Body></s:Envelope>
This is what's transmitted, using Fiddler Raw View
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo9SVGdFyrSRIggrGNQtX310AAAAAhRk+BZwrlEmerSG7e6xTXgkQ9xZ9IRxJmASnRkw2CLgACQAA</VsDebuggerCausalityData></s:Header><s:Body s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><q1:SendAndCommit xmlns:q1="http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/Request"><SendAndCommitSource href="#id1"/></q1:SendAndCommit><q2:Transaction id="id1" xsi:type="q2:Transaction" xmlns:q2="http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes"><ExactID xsi:type="xsd:string">AH2824-05</ExactID><Password xsi:type="xsd:string">0g4tu7pj1hb88q5d8xa55dlhvhvwlm3r</Password><Transaction_Type xsi:type="xsd:string">00</Transaction_Type><DollarAmount xsi:type="xsd:string">99.20</DollarAmount><Card_Number xsi:type="xsd:string">4111111111111111</Card_Number><Expiry_Date xsi:type="xsd:string">1215</Expiry_Date><CardHoldersName xsi:type="xsd:string">Jim Kirker</CardHoldersName><CVDCode xsi:type="xsd:string">999</CVDCode><Reference_No xsi:type="xsd:string">CA-Test</Reference_No><Client_IP xsi:type="xsd:string">::1</Client_IP><Client_Email xsi:type="xsd:string">jkirkerx@gmail.com</Client_Email><Currency xsi:type="xsd:string">USD</Currency><Address href="#id2"/></q2:Transaction><q3:Address_Type id="id2" xsi:type="q3:Address_Type" xmlns:q3="http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes"><Address1 xsi:type="xsd:string">18751 Park Haven Lane</Address1><Address2 xsi:type="xsd:string"/><City xsi:type="xsd:string">Huntington Beach</City><State xsi:type="xsd:string">CA</State><Zip xsi:type="xsd:string">92648</Zip><CountryCode xsi:type="xsd:string">US</CountryCode></q3:Address_Type></s:Body></s:Envelope>
Dim sb As StringBuilder = New StringBuilder
        Dim xmlSettings As New XmlWriterSettings
        xmlSettings.OmitXmlDeclaration = True

        Dim xmlWriter As XmlWriter = xmlWriter.Create(sb, xmlSettings)
        Dim writer As XmlDictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(xmlWriter)

        'Just grab the body of the request to generate the HMAC
        msg.WriteStartEnvelope(writer) 'If i remark this out, I get just the body to hash against
        msg.WriteStartBody(writer)
        msg.WriteBodyContents(writer)
        xmlWriter.WriteEndElement()
        xmlWriter.WriteEndElement() 'If i remark this out, I get just the body to hash against
        writer.Flush()

        Dim body As String = sb.ToString.Replace(" />", "/>")
        Dim xml_bytes() As Byte = encoder.GetBytes(body)

QuestionExecute multiple sql queries with one database hit Pin
satc27-Jun-15 19:53
satc27-Jun-15 19:53 
AnswerRe: Execute multiple sql queries with one database hit Pin
Sascha Lefèvre27-Jun-15 22:04
professionalSascha Lefèvre27-Jun-15 22:04 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc27-Jun-15 22:49
satc27-Jun-15 22:49 
GeneralRe: Execute multiple sql queries with one database hit Pin
Sascha Lefèvre27-Jun-15 23:15
professionalSascha Lefèvre27-Jun-15 23:15 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc27-Jun-15 23:28
satc27-Jun-15 23:28 
GeneralRe: Execute multiple sql queries with one database hit Pin
Sascha Lefèvre28-Jun-15 1:11
professionalSascha Lefèvre28-Jun-15 1:11 
GeneralRe: Execute multiple sql queries with one database hit Pin
Dave Kreskowiak28-Jun-15 2:17
mveDave Kreskowiak28-Jun-15 2:17 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc28-Jun-15 2:20
satc28-Jun-15 2:20 
GeneralRe: Execute multiple sql queries with one database hit Pin
Dave Kreskowiak28-Jun-15 10:40
mveDave Kreskowiak28-Jun-15 10:40 
GeneralRe: Execute multiple sql queries with one database hit Pin
Dave Kreskowiak28-Jun-15 2:09
mveDave Kreskowiak28-Jun-15 2:09 
GeneralRe: Execute multiple sql queries with one database hit Pin
satc28-Jun-15 2:12
satc28-Jun-15 2:12 
QuestionCreate a kind of "recovery script" for a deleted object in Entity Pin
satc27-Jun-15 19:06
satc27-Jun-15 19:06 
AnswerRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Dave Kreskowiak27-Jun-15 19:34
mveDave Kreskowiak27-Jun-15 19:34 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc27-Jun-15 19:40
satc27-Jun-15 19:40 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Richard MacCutchan27-Jun-15 21:16
mveRichard MacCutchan27-Jun-15 21:16 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
satc27-Jun-15 22:34
satc27-Jun-15 22:34 
GeneralRe: Create a kind of "recovery script" for a deleted object in Entity Pin
Eddy Vluggen28-Jun-15 0:16
professionalEddy Vluggen28-Jun-15 0:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.