er.wopaypal
Class PayPalAction
java.lang.Object
com.webobjects.appserver.WOAction
com.webobjects.appserver.WODirectAction
er.wopaypal.PayPalAction
- All Implemented Interfaces:
- NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation
- public class PayPalAction
- extends WODirectAction
PayPalAction is a DirectAction subclass that holds all the functionality for processing information that PayPal would send back to the application, including processing Instant Payment Notification communications, and responding to the successful and cancelled transaction pages to which PayPal will return users. Its action handler is PayPalAction, so your url will take the form: http://www.yoursite.com/cgi-bin/WebObjects/yourAppName.woa/wa/PayPalAction/actionName...
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding |
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor |
Field Summary |
static String |
paypalCgi
The cgi portion of PayPal's url for doing Instant Payment Notification verifications |
static String |
paypalSite
Simply PayPal's url, sans the protocol |
Method Summary |
WOActionResults |
cancelAction()
Provides a default method to return the page to which PayPal will send users after a cancelled transaction.
|
void |
ipnAction()
Processor for Instant Payment Notifications
The class takes the request and constructs a response that it then echoes back to PayPal, with the additional value "&cmd=_notify-validate.
|
WOActionResults |
returnAction()
Provides a default method to return the page to which PayPal will send users after a successful transaction.
|
Methods inherited from class com.webobjects.appserver.WOAction |
_isActionOnClass, _methodForAction, _preloadAllActionsOnClass, canAccessFieldsDirectly, context, debugString, existingSession, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, initializeRequestSessionIDInContext, languages, logString, pageWithName, request, session, setLanguages, takeValueForKey, takeValueForKeyPath, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath |
paypalSite
public static final String paypalSite
- Simply PayPal's url, sans the protocol
- See Also:
- Constant Field Values
paypalCgi
public static final String paypalCgi
- The cgi portion of PayPal's url for doing Instant Payment Notification verifications
- See Also:
- Constant Field Values
PayPalAction
public PayPalAction(WORequest aRequest)
- Constructor
- Parameters:
aRequest
- WORequest
ipnAction
public void ipnAction()
- Processor for Instant Payment Notifications
The class takes the request and constructs a response that it then echoes back to PayPal, with the additional value "&cmd=_notify-validate.
PayPal will then send a one word code for the status of the transaction. This method then parses for that word and sends the appropriate notification for the result, with the original WORequest object from PayPal attached to it (as the notification's object).
The notification gets picked up by the PayPalNotificationListenerClass, which then hands it to the delegate class you assigned to handle the notification. Pretty simple.
returnAction
public WOActionResults returnAction()
- Provides a default method to return the page to which PayPal will send users after a successful transaction.
First it checks to see if there's a System property assigned to tell it what page to return. If it finds one, it returns that page by calling pageWithName(property value).
If it doesn't find one, it returns the very simple default component, SuccessfulPayPalTransaction.
- Returns:
- WOComponent for successful PayPal transactions
cancelAction
public WOActionResults cancelAction()
- Provides a default method to return the page to which PayPal will send users after a cancelled transaction.
First it checks to see if there's a System property assigned to tell it what page to return. If it finds one it returns that page by calling pageWithName(property value).
If it doesn't find one, it returns the very simple default component, CancelledPayPalTransaction.
- Returns:
- WOComponent for cancelled PayPal transactions
Copyright © 2002 – 2004 Project Wonder.