Rolosoft.comRolosoft PayPal IPN Easy for .NET
Getting started
Rolosoft.com: PayPal IPN Easy for .NET

A quick guide to getting started.

Install the assemblies

Install the assemblies by either adding a project reference or, if you have a web site project, add the assemblies into the project ./bin folder.

Install your license

Please refer to the Installation section for details of how to install your product license.

Important Note:

Failure to correctly add these configuration sections will result in IPN Easy for .NET raising a ConfigurationSectionException.

Example implementation

This is an example of using Rolosoft PayPal IPN Easy in a ASP.NET based IPN listener application.

.aspx based listener:

Create Default.aspx

CopyC#
using System;
using System.Web.UI;

namespace IpnEasyDemo
{
    public partial class Default : Page
    {
        private Rolosoft.IpnEasy.Net.Ipn _ipnEasy;

        protected void Page_Load(object sender, EventArgs e)
        {
            _ipnEasy = new Rolosoft.IpnEasy.Net.Ipn();
            _ipnEasy.TransactionReceived += IpnEasyTransactionReceived;
            _ipnEasy.Validate();
        }

        private static void IpnEasyTransactionReceived(object sender, Rolosoft.IpnEasy.Net.PayPal.TransactionEventArgs e)
        {
            if (e.Transaction.Verification == Rolosoft.IpnEasy.Net.PayPal.Verification.VERIFIED)
            {
                //Do some further checks if necessary

                //Further processing, e.g. commit changes to your database
            }
            if (e.Transaction.Verification == Rolosoft.IpnEasy.Net.PayPal.Verification.INVALID)
            {
                //Flag this for further investigation.
                //DO NOT PROCESS THIS IPN AS IT MAY BE A FRAUDULANT TRANSACTION
            }
        }
    }
}
CopyVB.NET
Imports System.Web.UI

Namespace IpnEasyDemo
    Public Partial Class [Default]
        Inherits Page
        Private _ipnEasy As Rolosoft.IpnEasy.Net.Ipn

        Protected Sub Page_Load(sender As Object, e As EventArgs)
            _ipnEasy = New Rolosoft.IpnEasy.Net.Ipn()
            AddHandler _ipnEasy.TransactionReceived, AddressOf IpnEasyTransactionReceived
            _ipnEasy.Validate()
        End Sub

        Private Shared Sub IpnEasyTransactionReceived(sender As Object, e As Rolosoft.IpnEasy.Net.PayPal.TransactionEventArgs)
                    'Do some further checks if necessary


                    'Further processing, e.g. commit changes to your database
            If e.Transaction.Verification = Rolosoft.IpnEasy.Net.PayPal.Verification.VERIFIED Then
            End If
                    'Flag this for further investigation.
                    'DO NOT PROCESS THIS IPN AS IT MAY BE A FRAUDULANT TRANSACTION
            If e.Transaction.Verification = Rolosoft.IpnEasy.Net.PayPal.Verification.INVALID Then
            End If
        End Sub
    End Class
End Namespace