|
I have this credit card API. You can write your own XML or use their WSDL file, register it as a Web Service. I starting to prefer the first method.
So on the XML, your suppose to generate a request header, then send the XML. Which makes sense to me.
On the WSDL, I have no clue how to do the same thing, of even come up with the search keywords to do research.
I guess my question is what would this be called, keyword suggestions.
Perhaps your thought on the task at hand here. Maybe go recode to XML using my XSD Class, and then use the bottom code.
For some reason, I'm including some code here, the give my question more clarity.
'Make a tranaction
Dim txn As New com.firstdata.globalgatewaye4.V14.Transaction
'Credentials
txn.ExactID = sCA.Exact_ID
txn.Password = sCA.Exact_Password
'//////////////////////////////////////////////////////////////////////////////////////
'Transmit the Card Authorization Request
Dim ws As com.firstdata.globalgatewaye4.V14.Service = New com.firstdata.globalgatewaye4.V14.Service
Dim rxn As com.firstdata.globalgatewaye4.V14.TransactionResult = New com.firstdata.globalgatewaye4.V14.TransactionResult
rxn = ws.SendAndCommit(txn)
'//////////////////////////////////////////////////////////////////////////////////////
I started working on this, thinking I could just pass the XML generated from the WSDL to the transmitter, but I'm on the wrong track here.
Private Function transmit_HMAC( _
ByVal pValue As String) As Integer
Dim dwExitCode As Integer = 2
'Generate the Hashed Content
Dim encoder As ASCIIEncoding = New ASCIIEncoding
Dim wsdl_bytes() As Byte = encoder.GetBytes(pValue)
Dim sha1_crypto As SHA1CryptoServiceProvider = New SHA1CryptoServiceProvider
Dim hash As String = BitConverter.ToString(sha1_crypto.ComputeHash(wsdl_bytes)).Replace("-", "")
Dim hashed_content As String = hash.ToLower
'Grab a copy of the keys
Dim m_keyID As String = My.Resources.HMAC_KEY_ID
Dim m_key As String = My.Resources.HMAC_KEY
'Grab a copy of the EndPoint
Dim m_url As String = My.Resources.endPoint_Demo
'Build and assign values to hashing and header variables
Dim m_method As String = "POST\n"
Dim m_type As String = "application/xml" 'REST XML
Dim m_time As String = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
Dim m_uri As String = "/transaction/v14"
Dim m_hashData As String = m_method & m_type & "\n" & hashed_content & "\n" & m_time & "\n" + m_uri
Dim m_hmac_sha1 As New HMACSHA1(Encoding.UTF8.GetBytes(m_key))
Dim m_hmac_data() As Byte = m_hmac_sha1.ComputeHash(Encoding.UTF8.GetBytes(m_hashData))
Dim m_base64_hash As String = Convert.ToBase64String(m_hmac_data)
'Build the HTTP Request
Dim request As HttpWebRequest = HttpWebRequest.Create(m_url)
request.Method = "POST"
request.ContentType = m_type
request.Accept = "*/*"
request.Headers.Add("x-gge4-date", m_time)
request.Headers.Add("x-gge4-content-sha1", hashed_content)
request.Headers.Add("Authorization", "GGE4_API " + m_keyID + ":" + m_base64_hash)
request.ContentLength = pValue.Length
Using stream_writer As StreamWriter = New StreamWriter(request.GetRequestStream)
stream_writer.Write(pValue)
End Using
Return dwExitCode
End Function
|
|
|
|
|
I'm trying to use a progress bar in a .Net 4.5 application while calling a method that doesn't return for 5-7 seconds. This is a simple application, but the examples I've seen are either based on file operations or web operations. Since mine is neither I'm unclear as to:
1) What type of async method to use?
2) For the await method what type of .NET method do I use (e.g., .DownloadStringTaskAsync)?
I'm trying to use Furytrader post 'Simple .Net progress bar using async/await', 2/18/2014, but I'm struggling. Example code is a lot to ask for but mod's to Furytrader's post might be easier.
|
|
|
|
|
With a bit more investigation, it was apparent that the time consuming task in this example, retrieving a string from a website, was effectively driving the frequency that the progress bar was updated -- retrieve a string then update the progress bar. My problem is that the task I'm calling does not return for several seconds and it is during this time that I want to be updating the progress bar since the task is a blocking task.
How do I call such a task and also be updating the progress bar?
|
|
|
|
|
Howdy - you might try using a Background worker for this task. The Background worker class provides a straight forward method to update progress bars etc.
|
|
|
|
|
Dear Friends,
I am using Windows 8 (64 Bit) and M. Office 2007 (32 Bit) but I cant create Access Database.
Please tell me, I need to install MS Access 2007 or it pre installed into ms office 2007. there are no option display in start menu about access 2007.
Amol
|
|
|
|
|
What does this have to do with VB.NET??
|
|
|
|
|
Access only comes with the Professional edition of Microsoft Office. If you have the Standard or Student edition, Access is not included.
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
|
Hello experts,
I have a combobox which lists down lot of values like Apple, Ant, Cat, Carrot,Costco etc. But I want it to work as follows.
so when I type "Ca" on combobox it should show only those in the list that starts with "Ca" In this case its carrot and Cat.
This is a windows application developed in Vb.net.
Please let me know how to achieve that.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Solved
cbmBrand.DropDownStyle = ComboBoxStyle.DropDown
cbmBrand.AutoCompleteMode = AutoCompleteMode.SuggestAppend
cbmBrand.AutoCompleteSource = AutoCompleteSource.ListItems
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
The 5 is for posting your own resolution
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you This gives lot of boost up. Because you know I am new to DotNet.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Hello, are you binding the records from database or from arraylist?
|
|
|
|
|
Database. I used a Stored Procedure to bind in.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
string Block = "1111111111";
string a = "87654321";
string m = "2222";
string c = "11";
string u = "99";
string v = "00";
byte[] result = W(
SoapHexBinary.Parse(a).Value,
SoapHexBinary.Parse(m).Value,
SoapHexBinary.Parse(v).Value[0],
SoapHexBinary.Parse(u).Value[0],
SoapHexBinary.Parse(c).Value[0],
SoapHexBinary.Parse(Block).Value
);
from VB.NET
Dim Block As String = "AAAAAAAAAA"
Dim a As String = "99999999"
Dim m As String = "3333"
Dim a As String = "77"
Dim u As String = "07"
Dim v As String = "00"
Dim result As String = ""
result = W(a, m, v, u, a, Block)
a, m and Block are not accepted.
I'm not a C# expert so I guess that there is something to be done in order to correctly address strings and arrays between the two languages. Must be kind of basic rule I ignore...
Anybody can help?
Thanks in advance.
Seppax
|
|
|
|
|
|
I downloaded a vb 3d game using dx8. When I tried to run it, I got this error message
run-time error '-2005529767 (88760b59)': automation error. I tried google but couldn't get the solution.
Any idea is welcome!
|
|
|
|
|
Otekpo Emmanuel wrote: I tried google So, did I. Looks like you missed a parameter, according to this[^].
Otekpo Emmanuel wrote: Any idea is welcome! Try asking where you downloaded it - we don't know what code you are referring to.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
On top of that Managed DirectX has been dead for a long time now.
|
|
|
|
|
Good day friends! Please does anyone know where I can get good tutorial on 3d raycasting using vb6 or vb.net. I tried google but am not ok with the ones I seen.
|
|
|
|
|
Raytracing is CPU-intensive, and not done in VB. You could look for VB.NET library that does the raytracing for you.
VB6 has been dead for some time - no one should be actively writing software in it, as the product would be considered outdated before the first line is written.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have a user control with two buttons on it. I want to make everything except the buttons transparent, so the main form on which it loads can be seen behind it. There is no code behind on the user control class, but in the designer I have set the backcolor property of all controls to Transparent. When I run the program, I can see different controls behind the button images.
<how can="" i="" add="" images="" with="" the="" question="" here?="">
|
|
|
|
|
Then you must have done something wrong. But without more information we cannot guess what that is.
|
|
|
|
|
Is there a way to add images here? The problem is, while all controls (user control and the 2 buttons on it) have their backcolor property set to Color.Transparent, when I run it, it's not transparent. The background shows an image of wherever my mouse moves on main form. I think the background of the user control does not refresh properly, but I am not sure how to handle this.
For example, if my mouse is on Button 1, then the background of Button 2 changes to the image on Button 1.
|
|
|
|
|
You need to create a simple text application to try and figure out where the problem is. Make a simple form with no more than three controls, in a similar configuration to what you have already. Then run some tests and see if you can identify the exact circumstances of the problem.
|
|
|
|