This is the VB.NET conversion for getting transaction detail. Ensure you add the following 'Imports' or 'Using' statements to reference the dll's
I added the serializaion code in the last part of the function to convert the native class to simple XML output.
You can test with the following transaction that appears in the database for the sandbox: 0DG1296821648494L
Imports System.Web.Services.WebService
Imports System.Xml.Serialization
Imports com.paypal.sdk.services
Imports com.paypal.soap.api
Imports com.paypal.sdk.profiles
Function GetTransactionDetailsCode(ByVal trxID As String) As String
Dim caller As New CallerServices()
Dim profile As IAPIProfile = ProfileFactory.createSignatureAPIProfile()
' Set up your API credentials, PayPal end point, and API version.
profile.APIUsername = "sdk-three_api1.sdk.com"
profile.APIPassword = "QFZCWN5HZM8VBG7Q"
profile.APISignature = "AVGidzoSQiGWu.lGj3z15HLczXaaAcK6imHawrjefqgclVwBe8imgCHZ"
profile.Environment = "sandbox"
caller.APIProfile = profile
' Create the request object.
Dim concreteRequest As New GetTransactionDetailsRequestType()
concreteRequest.Version = "51.0"
' Add request-specific fields to the request.
concreteRequest.TransactionID = trxID
' Execute the API operation and obtain the response.
Dim pp_response As New GetTransactionDetailsResponseType()
pp_response = DirectCast(caller.[Call]("GetTransactionDetails", concreteRequest), GetTransactionDetailsResponseType)
'Return pp_response.Ack.ToString()
Dim SerializedContent As New StringWriter
Try
Dim x As New System.Xml.Serialization.XmlSerializer(pp_response.[GetType]())
'x.Serialize(Console.Out, WSResults)
x.Serialize(SerializedContent, pp_response)
Console.WriteLine(SerializedContent.ToString)
Catch ex As Exception
End Try
Return True
End Function
Good luck.
Scott