Project Wonder 2.0

er.wopaypal
Class PayPalAction

java.lang.Object
  extended bycom.webobjects.appserver.WOAction
      extended bycom.webobjects.appserver.WODirectAction
          extended byer.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 Class Summary
 
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
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
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
 
Fields inherited from class com.webobjects.appserver.WODirectAction
actionText
 
Fields inherited from class com.webobjects.appserver.WOAction
_actionClasses, _context
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
_CLASS, NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
PayPalAction(WORequest aRequest)
          Constructor
 
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.WODirectAction
_componentAction, defaultAction, getSessionIDForRequest, performActionNamed, takeFormValueArraysForKeyArray, takeFormValuesForKeyArray
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding
takeValueForKey, valueForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
takeValueForKeyPath, valueForKeyPath
 
Methods inherited from interface com.webobjects.foundation.NSValidation
validateTakeValueForKeyPath, validateValueForKey
 

Field Detail

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
Constructor Detail

PayPalAction

public PayPalAction(WORequest aRequest)
Constructor

Parameters:
aRequest - WORequest
Method Detail

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

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.