Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System
- Imports com.paypal.sdk.services
- Imports com.paypal.sdk.profiles
- Imports com.paypal.sdk.util
- Namespace GenerateCodeNVP
- Public Class GetTransactionDetails
- Public Sub New()
- End Sub
- Public Function GetTransactionDetailsCode(ByVal transactionID As String) As String
- Dim caller As New NVPCallerServices()
- Dim profile As IAPIProfile = ProfileFactory.createSignatureAPIProfile()
- profile.APIUsername = "xxx"
- profile.APIPassword = "xxx"
- profile.APISignature = "xxx"
- profile.Environment = "sandbox"
- caller.APIProfile = profile
- Dim encoder As New NVPCodec()
- encoder("VERSION") = "51.0"
- encoder("METHOD") = "GetTransactionDetails"
- encoder("TRANSACTIONID") = transactionID
- Dim pStrrequestforNvp As String = encoder.Encode()
- Dim pStresponsenvp As String = caller.[Call](pStrrequestforNvp)
- Dim decoder As New NVPCodec()
- decoder.Decode(pStresponsenvp)
- Return decoder("ACK")
- End Function
- End Class
- End Namespace
- Private Sub cmdGetTransDetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGetTransDetail.Click
- Dim thereturn As String
- thereturn =GetTransactionDetailsCode("test51322")
- End Sub
- Error 2 Name 'GetTransactionDetailsCode' is not declared.
- Dim payPalAPI As New GenerateCodeNVP.GetTransactionDetails
- Dim theReturn As String
- theReturn = payPalAPI.GetTransactionDetailsCode("test51322")
- Private Sub cmdGetTransDetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGetTransDetail.Click
- Dim thereturn As String
- Dim myTransaction as new GetTransactionDetails
- thereturn = myTransaction.GetTransactionDetailsCode("test51322")
- End Sub
- Dim instance As New GetTransactionDetails()
- thereturn = instance.GetTransactionDetailsCode("test51322")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement