| You are here: DEVPPL ‹ Forum ‹ Programming ‹ Visual Basic Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
Trying to Paypal balance show up in textbox VB.NET
1 post
• Page 1 of 1
0
Trying to Paypal balance show up in textbox VB.NET
To be clear, what I am trying to acheive is:
Have my Paypal current balance show up in a textbox on VB.NET using the PayPal API
Not a VB.Net Webbrowser
I have followed the guide on this page
http://www.blog-dotnet.com/post/Usin...tarted%29.aspx
But I keep getting the error
Object reference not set to an instance of an object.
when I execute this code in VB.NET:
Imports PayPalAPITest.com.paypal.www
Public Class Form1
Private Sub btnGetBalance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetBalance.Click
Dim credentials As New UserIdPasswordType
credentials.Username = "*********_api1.live.co.uk"
credentials.Password = "****************"
credentials.Signature = "****************.****************-****************"
credentials.Subject = "****************@********.co.uk"
Dim customSecurityHeader As New CustomSecurityHeaderType
customSecurityHeader.Credentials = credentials
Dim ServiceInterface As New PayPalAPISoapBinding
ServiceInterface.Url = "https://api-3t.paypal.com/2.0/"
ServiceInterface.RequesterCredentials = customSecurityHeader
Dim request As New GetBalanceRequestType
request.Version = "59.0"
Dim req As New GetBalanceReq
req.GetBalanceRequest = request
Dim response As GetBalanceResponseType
response = ServiceInterface.GetBalance(req)
Me.txtBalance.Text = response.Balance.Value
End Sub
End Class
Has anyone managed to get this to work??
If so, please lend a hand
Have my Paypal current balance show up in a textbox on VB.NET using the PayPal API
Not a VB.Net Webbrowser
I have followed the guide on this page
http://www.blog-dotnet.com/post/Usin...tarted%29.aspx
But I keep getting the error
Object reference not set to an instance of an object.
when I execute this code in VB.NET:
Imports PayPalAPITest.com.paypal.www
Public Class Form1
Private Sub btnGetBalance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetBalance.Click
Dim credentials As New UserIdPasswordType
credentials.Username = "*********_api1.live.co.uk"
credentials.Password = "****************"
credentials.Signature = "****************.****************-****************"
credentials.Subject = "****************@********.co.uk"
Dim customSecurityHeader As New CustomSecurityHeaderType
customSecurityHeader.Credentials = credentials
Dim ServiceInterface As New PayPalAPISoapBinding
ServiceInterface.Url = "https://api-3t.paypal.com/2.0/"
ServiceInterface.RequesterCredentials = customSecurityHeader
Dim request As New GetBalanceRequestType
request.Version = "59.0"
Dim req As New GetBalanceReq
req.GetBalanceRequest = request
Dim response As GetBalanceResponseType
response = ServiceInterface.GetBalance(req)
Me.txtBalance.Text = response.Balance.Value
End Sub
End Class
Has anyone managed to get this to work??
If so, please lend a hand
- Vbepicness
- Reputation: 0
- Posts: 1
- Joined: Fri Sep 02, 2011 7:00 pm
- Highscores: 0
- Arcade winning challenges: 0
Trying to Paypal balance show up in textbox VB.NET - Sponsored results
- Sponsored results
|
|