paypalnvp.request
Class DoAuthorization

java.lang.Object
  extended by paypalnvp.request.DoAuthorization
All Implemented Interfaces:
java.io.Serializable, Request

public final class DoAuthorization
extends java.lang.Object
implements Request

Authorize a payment.

See Also:
Serialized Form

Constructor Summary
DoAuthorization(java.lang.String transactionId, java.lang.String amount)
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getNVPRequest()
          Creates and returns part of the nvp (name value pair) request containing request values
 java.util.Map<java.lang.String,java.lang.String> getNVPResponse()
          Return response from paypal.
 void setCurrency(Currency currency)
          Sets currency.
 void setNVPResponse(java.util.Map<java.lang.String,java.lang.String> nvpResponse)
          Setter for nvp (name value pair) response
 void setOrder()
          Sets type of transaction to authorize to Order, which means that the transaction represents a customer order that can be fulfilled over 29 days.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoAuthorization

public DoAuthorization(java.lang.String transactionId,
                       java.lang.String amount)
                throws java.lang.IllegalArgumentException
Parameters:
transactionId - The value of the order's transaction identification number returned by PayPal Character length and limits: 19 single-byte characters maximum.
amount - Amount to authorize. Limitations: Value is a positive number which cannot exceed $10,000 USD in any currency. No currency symbol. Must have two decimal places, decimal separator must be a period (.).
Throws:
java.lang.IllegalArgumentException
Method Detail

setOrder

public void setOrder()
Sets type of transaction to authorize to Order, which means that the transaction represents a customer order that can be fulfilled over 29 days.


setCurrency

public void setCurrency(Currency currency)
Sets currency.

Parameters:
currency -

getNVPRequest

public java.util.Map<java.lang.String,java.lang.String> getNVPRequest()
Description copied from interface: Request
Creates and returns part of the nvp (name value pair) request containing request values

Specified by:
getNVPRequest in interface Request
Returns:
part of the nvp request as a Map

setNVPResponse

public void setNVPResponse(java.util.Map<java.lang.String,java.lang.String> nvpResponse)
Description copied from interface: Request
Setter for nvp (name value pair) response

Specified by:
setNVPResponse in interface Request

getNVPResponse

public java.util.Map<java.lang.String,java.lang.String> getNVPResponse()
Description copied from interface: Request
Return response from paypal. If response is not set/received returns empty Map.

Specified by:
getNVPResponse in interface Request
Returns:
response from paypal as a Map

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object