Project Wonder 5.0

er.wopaypal
Class PayPalNotificationListener

java.lang.Object
  extended by er.wopaypal.PayPalNotificationListener

public class PayPalNotificationListener
extends java.lang.Object

The PayPalNotificationListener class is a receiver for notifications from PayPalAction's ipnAction method, which broadcasts notifications of different events having to do with "Instant Payment Notification" transaction notifications from PayPal. The observer gets registered to receive notifications, and the Delegate interface defines what it can do with the notifications. If a delegate is registered and implements some subset of the methods defined in the PayPalNotificationListener.Delegate interface, PayPalNotificationListener invokes the appropriate method on the delegate object.


Nested Class Summary
static interface PayPalNotificationListener.Delegate
          Interface for the delegate.
static class PayPalNotificationListener.Observer
          The Observer is the object which is registered (in WOPayPal) to listen for the NSNotifications broadcast by the PayPalAction's ipnAction method.
 
Field Summary
static java.lang.String DeniedPayPalPaymentReceivedNotification
          Notification name when IPN returns DENIED result.
static java.lang.String FailedPayPalPaymentReceivedNotification
          Notification name when IPN returns FAILED result.
static java.lang.String InvalidPayPalPaymentReceivedNotification
          Notification name when IPN returns INVALID result.
static java.lang.String PendingPayPalPaymentReceivedNotification
          Notification name when IPN returns PENDING result.
static java.lang.String ValidPayPalPaymentReceivedNotification
          Notification name when IPN returns VALID result.
 
Constructor Summary
PayPalNotificationListener()
          Constructor.
 
Method Summary
protected static java.lang.Object defaultDelegate()
          Method to return the default delegate object.
static java.lang.Object delegate()
          Method to return the assigned delegate object.
static PayPalNotificationListener.Observer observer()
          Method to return the observer object.
static void setDelegate(java.lang.Object obj)
          Method to assign the class's delegate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DeniedPayPalPaymentReceivedNotification

public static final java.lang.String DeniedPayPalPaymentReceivedNotification
Notification name when IPN returns DENIED result.

See Also:
Constant Field Values

FailedPayPalPaymentReceivedNotification

public static final java.lang.String FailedPayPalPaymentReceivedNotification
Notification name when IPN returns FAILED result.

See Also:
Constant Field Values

InvalidPayPalPaymentReceivedNotification

public static final java.lang.String InvalidPayPalPaymentReceivedNotification
Notification name when IPN returns INVALID result.

See Also:
Constant Field Values

PendingPayPalPaymentReceivedNotification

public static final java.lang.String PendingPayPalPaymentReceivedNotification
Notification name when IPN returns PENDING result.

See Also:
Constant Field Values

ValidPayPalPaymentReceivedNotification

public static final java.lang.String ValidPayPalPaymentReceivedNotification
Notification name when IPN returns VALID result.

See Also:
Constant Field Values
Constructor Detail

PayPalNotificationListener

public PayPalNotificationListener()
Constructor.

Method Detail

defaultDelegate

protected static java.lang.Object defaultDelegate()
Method to return the default delegate object. Creates a new Object as the delegate if it's not assigned.

Returns:
Object

delegate

public static java.lang.Object delegate()
Method to return the assigned delegate object. If one is not assigned, it returns the defaultDelegate object.

Returns:
Object that is assigned as the class' delegate.

setDelegate

public static void setDelegate(java.lang.Object obj)
Method to assign the class's delegate object. Throws an IllegalArgumentException if it receives a null object to assign as the delegate.

Parameters:
obj - Object

observer

public static PayPalNotificationListener.Observer observer()
Method to return the observer object. If one is not assigned, it instantiates and returns a new Observer.

Returns:
Observer

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.