Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7798215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:56:15+00:00 2026-06-01T23:56:15+00:00

{Following is the vb.net code for IPN listener: If Me.TestMode = True Then Me.RequestUrl

  • 0
{Following is the vb.net code for IPN listener:
    If Me.TestMode = True Then
            Me.RequestUrl = "https://www.sandbox.paypal.com/cgi-bin/webscr"
        Else
            Me.RequestUrl = "https://www.sandbox.paypal.com/cgi-bin/webscr" '"https://www.paypal.com/cgi-bin/webscr"
        End If



        '====================================Test======================================'
        Dim startTime As String = String.Format("{0:MM-dd-yyyy hh:mm:ss:tt}", Now)
        '=============================================================================='

        Dim req As HttpWebRequest = CType(WebRequest.Create(Me.RequestUrl), HttpWebRequest)
        req.Method = "POST"
        req.ContentType = "application/x-www-form-urlencoded"
        Dim Param() As Byte = HttpContext.Current.Request.BinaryRead(HttpContext.Current.Request.ContentLength)
        Dim strRequest As String = Encoding.ASCII.GetString(Param)
        strRequest = strRequest & "&cmd=_notify-validate"
        req.ContentLength = strRequest.Length
        ' Dim pairs() As String = strRecieved.Split("&")
        Using streamOut As StreamWriter = New StreamWriter(req.GetRequestStream(), Encoding.ASCII)
            streamOut.Write(strRequest.ToString)
            streamOut.Close()
        End Using
        Dim streamIn As StreamReader = New StreamReader(req.GetResponse().GetResponseStream())
        Dim strResponse As String = streamIn.ReadToEnd()
        streamIn.Close()
        WriteLog(strResponse)

I have done code for paypal IPN listener in vb.net . When I test that url with paypal sandbox account, it shows following message:
“IPN successfully sent.”
But when I check my log file on server, then it shows INVALID response from paypal sandbox url. Without VALID response my other code will not work.
Please help!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:56:17+00:00Added an answer on June 1, 2026 at 11:56 pm

    Generate paypal transaction like e.g buy now button via vb.net

    Public Shared Function GetPayPalPaymentUrl(item_name As String, item_number As String, amount As String, quantity As String, username As String) As String
    Dim strURL As String = "https://www.sandbox.paypal.com/cgi-bin/webscr"
    If PaypalBLL.Paypal_Live_Status() = 1 Then
        strURL = "https://www.paypal.com/cgi-bin/webscr"
    End If
    Dim BaseUrl As String = Config.GetUrl()
    Dim cancel_url As String = BaseUrl + "paypal/cancel.aspx"
    Dim return_url As String = BaseUrl + "paypal/confirmation.aspx"
    Dim notifyUrl As String = BaseUrl + "paypal/ipn.aspx"
    'string image_url = ""
    Dim image_url As String = ""
    ' paypal header url
    Dim paypal_logo As String = HttpUtility.UrlEncode(BaseUrl + "images/logo.png")
    Dim Url As New StringBuilder()
    Dim CustomFieldValue As String = username
    'User-defined field which PayPal passes through the system and returns to you in your merchant payment notification email. Subscribers do not see this field.
    Url.Append(strURL + "?cmd=_xclick&upload=1&rm=2&no_shipping=1&no_note=1&currency_code=USD&business=" + PaypalBLL.Paypal_Receiver_Email() + "&item_number=" + item_number + "&item_name=" + item_name + "&amount=" + amount + "&quantity=" + quantity + "&undefined_quantity=0&notify_url=" + notifyUrl + "&return=" + return_url + "&cancel_return=" + cancel_url + "&cpp_header_Image=" + image_url + "&cpp_headerback_color=ECDFDF&cpp_headerborder_color=A02626&cpp_payflow_color=ECDFDF&image_url=" + paypal_logo + "&custom=" + CustomFieldValue + "")
    Return Url.ToString()
    End Function
    

    Generate paypal link, when you click on link, you will be redirect to paypal sandbox or live link. once you complete transaction, you will be redirected to website back and within background paypal will send transaction event via ipn.

    Hope you will receive proper ipn response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following C# ASP.Net code for processing PayPal IPN after purchase. I
Given the following code $c= new SoapClient('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL'); $usa = USD; $eng = GBP; doing
I have the following HTML/ASP.NET code: <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title>Ny test</title> <link rel=stylesheet
I have following asp.net code but it gives error when I change dropdown selected
The following C# code (.NET Framework 3.5) returns name and description of all users
I got following code from net and it looks everything is proper but i'm
I've got the following ASP.NET 4 MVC 3 code in a view: @Html.TextBoxFor(model =>
The following code generates a FileNotFoundException (using .NET 2.0): using System; using System.Collections.Generic; using
The following code sample (also at http://jsfiddle.net/MZwBS/ ) var items = []; items.push({ example:
The following is my Class code import java.net.*; import java.util.*; import java.sql.*; import org.apache.log4j.*;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.