Project Wonder 5.0

er.wopaypal
Class PayPalAction

java.lang.Object
  extended by com.webobjects.appserver.WOAction
      extended by com.webobjects.appserver.WODirectAction
          extended by er.wopaypal.PayPalAction
All Implemented Interfaces:
com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation

public class PayPalAction
extends com.webobjects.appserver.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/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
static java.lang.String paypalCgi
          The cgi portion of PayPal's url for doing Instant Payment Notification verifications
static java.lang.String paypalSite
          Simply PayPal's url, sans the protocol
static java.lang.String sandboxSite
          PayPal developer sandbox URL
 
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.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
PayPalAction(com.webobjects.appserver.WORequest aRequest)
          Constructor
 
Method Summary
 com.webobjects.appserver.WOActionResults cancelAction()
          Provides a default method to return the page to which PayPal will send users after a cancelled transaction.
 com.webobjects.appserver.WOActionResults 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.
 com.webobjects.appserver.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.ErrorHandling
handleQueryWithUnboundKey, handleTakeValueForUnboundKey, unableToSetNullForKey
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
takeValueForKeyPath, valueForKeyPath
 
Methods inherited from interface com.webobjects.foundation.NSKeyValueCoding
takeValueForKey, valueForKey
 
Methods inherited from interface com.webobjects.foundation.NSValidation
validateTakeValueForKeyPath, validateValueForKey
 

Field Detail

paypalSite

public static final java.lang.String paypalSite
Simply PayPal's url, sans the protocol

See Also:
Constant Field Values

paypalCgi

public static final java.lang.String paypalCgi
The cgi portion of PayPal's url for doing Instant Payment Notification verifications

See Also:
Constant Field Values

sandboxSite

public static final java.lang.String sandboxSite
PayPal developer sandbox URL

See Also:
Constant Field Values
Constructor Detail

PayPalAction

public PayPalAction(com.webobjects.appserver.WORequest aRequest)
Constructor

Parameters:
aRequest - WORequest
Method Detail

ipnAction

public com.webobjects.appserver.WOActionResults 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 com.webobjects.appserver.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 com.webobjects.appserver.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: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.