Rolosoft.comRolosoft PayPal IPN Easy for .NET
Ipn Class
NamespacesRolosoft.IpnEasy.NetIpn
Rolosoft.com: PayPal IPN Easy for .NET

Rolosoft PayPal IPN Easy.

Easily receive IPN messages from PayPal and integrate them into your .NET application.

Declaration Syntax
C#Visual BasicVisual C++
public sealed class Ipn
Public NotInheritable Class Ipn
public ref class Ipn sealed
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
Ipn(PayPalEnvironment)
Initializes a new instance of the Ipn class.

Constructor.


Ipn()()()
Initializes a new instance of the Ipn class. Constructor.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
LicensedTo

Gets the name of the person that this product is licensed to.


LicenseExpiresOn
The date (if any) that the license expires on.

LicenseType

Gets the type of the license.


MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
OnTransactionReceived(TransactionEventArgs)

PayPal IPN received.


PayPalEnvironment

Gets the PayPal environment.


ProductInfo

Gets the information (name, version, edition) of this product.


RawData

Gets all form values returned from PayPal IPN notifications.


SerialNumber

Gets the serial number for this product.


ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Transaction

Gets common known data returned from PayPal through IPN notification.

Data is converted into strong typed .NET classes.


TransactionReceived
A PayPal IPN has been received.

Validate()()()

Validate the IPN received from PayPal.

This method verifies that the IPN is genuine and raises the OnPayPalTransactionReceived event that can be used to extract a strongly typed data structure (of type PayPalData) from the IPN.


Examples
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
Inheritance Hierarchy

Assembly: Rolosoft.IpnEasy.Net (Module: Rolosoft.IpnEasy.Net) Version: 1.0.4316.24325 (1.0.0.5)