I've managed to resolve the problem using the .NET Reflector to see what the code was expecting internally. I have now added the following code to the start of my Paypal processing code:
Session("stage") = PAYPAL_ENVIRONMENT
SetProfile.SessionProfile = CreateDefaultProfile() ' defined below
ASPDotNetSamples.Global.is3token = True
ASPDotNetSamples.Global.isunipay = False
ASPDotNetSamples.Global.ispermission = False
' Add this function to your class
Private Function CreateDefaultProfile() As IAPIProfile
Dim profile As IAPIProfile = ProfileFactory.createSignatureAPIProfile()
profile.APIUsername = API_USERNAME
profile.APIPassword = API_PASSWORD
profile.Environment = PAYPAL_ENVIRONMENT
profile.Subject = PAYPAL_SUBJECT
profile.APISignature = API_SIGNATURE
Return profile
End Function
' These are the default values supplied by the example code, add your own values here if necessary
Private Const API_USERNAME As String = "sdk-three_api1.sdk.com"
Private Const API_PASSWORD As String = "QFZCWN5HZM8VBG7Q"
Private Const API_SIGNATURE As String = "A.d9eRKfd1yVkRrtmMfCFLTqa6M9AyodL0SJkhYztxUi8W9pCXF6.4NI"
Private Const PAYPAL_ENVIRONMENT As String = "SANDBOX"
Private Const PAYPAL_SUBJECT As String = ""
Hope this helps someone else who may experience this problem.
I conclude that there are two ways of constructing a software design: One way is to make it so simple there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies." - Tony Hoare