|That's called a named / value pair, it's not a query string. Don't confuse what you transmit in a web request with what you type in the browser url window.
name = value
amount = value
and is separated by any char you choose. They just happen to choose a ampersand, so it looks like a query string. The separator char can be a | as well. JSON uses something similar as well. Other companies let you choose the sep character when transmitting the request, so we use the | char. PayPal wants to use the ampersand to make it more confusing.
A web response is the pure essence, or purpose of response.write. response.write is not for returning a html tag like response.write("<
><>""), but is made to return a request like response.write("name=John Doe&amount=40.00¤cycode=USD") in which there is no html.
So when you transmit, you build your name/value string
strPostBuild = New StringBuilder
.Append("USER=" & API_UserName)
.Append("&PWD=" & API_Password)
.Append("&SIGNATURE=" & API_Signature)
.Append("&VERSION=" & API_Version)
.Append("&METHOD=" & API_Method)
.Append("&TRANACTIONID=" & API_TransactionID)
.Append("&AMT=" & API_Amount)
.Append("&TRANSACTIONENTITY=" & "ORDER")
.Append("&CURRENCYCODE=" & API_CurrencyCode)
strPost = strPostBuild.ToString
Then you parse the response from PayPal
Dim values As String
values = TheGatewayResponse
Dim Capture As String() = Nothing
Capture = values.Split("&")
Dim ResponseCollection As NameValueCollection = New NameValueCollection
Dim ResponseName As String = Nothing
Dim ResponseValue As String = Nothing
Dim slashPosition As Integer = 0
For Each DataField In Capture
slashPosition = DataField.LastIndexOf("=")
ResponseName = Left(DataField, slashPosition)
ResponseValue = DataField.Substring(slashPosition + 1)
I can't tell you what the Form is for, you would have to paste response string only in order for me to interpret it.
Oh, a warning to you. I mock PayPal for providing sample code for programmers, because they never end up learning how it really works. Entry level programmers will make a few tweaks to the code, get it to work, and think they are code god, but when it breaks, they can't fix it, and run back to the paypal forum for help, in which perhaps maybe 1 guy knows how it works.
You should write your own code from scratch, and build on it to make it better. Then when you write for UPS, Payment Tech, you will have a clue as to how it works.
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.