paypalnvp.request
Class DoDirectPayment

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

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

See Also:
Serialized Form

Constructor Summary
DoDirectPayment(java.lang.String ipAddress, Payment payment, CreditCard creditCard, PayerInformation payer, Address address)
           
 
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 setNVPResponse(java.util.Map<java.lang.String,java.lang.String> nvpResponse)
          Setter for nvp (name value pair) response
 void setPaymentAction(PaymentAction action)
          How you want to obtain payment Default: Sale Note: Order is not allowed for Direct Payment.
 void setReturnFMF(boolean fmf)
          Flag to indicate whether you want the results returned by Fraud Management Filters.
 void setSecure3D(Secure3D secure3D)
           
 void setShipToAddress(ShipToAddress address)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoDirectPayment

public DoDirectPayment(java.lang.String ipAddress,
                       Payment payment,
                       CreditCard creditCard,
                       PayerInformation payer,
                       Address address)
                throws java.lang.IllegalArgumentException
Parameters:
ipAddress - IP address of the payer’s browser. Note: PayPal records this IP addresses as a means to detect possible fraud. Character length and limitations: 15 single-byte characters, including periods, for example: 255.255.255.255.
Throws:
java.lang.IllegalArgumentException
Method Detail

setPaymentAction

public void setPaymentAction(PaymentAction action)
                      throws java.lang.IllegalArgumentException
How you want to obtain payment Default: Sale Note: Order is not allowed for Direct Payment.

Parameters:
action - Authorization indicates that this payment is a basic authorization subject to settlement with PayPal Authorization & Capture. Sale indicates that this is a final sale for which you are requesting payment.
Throws:
java.lang.IllegalArgumentException

setReturnFMF

public void setReturnFMF(boolean fmf)
Flag to indicate whether you want the results returned by Fraud Management Filters. By default this is false.

Parameters:
fmf - true: receive FMF details false: do not receive FMF details (default)

setShipToAddress

public void setShipToAddress(ShipToAddress address)
Parameters:
address - Ship To Address Fields

setSecure3D

public void setSecure3D(Secure3D secure3D)
Parameters:
secure3D - 3D Secure Request Fields (U.K. Merchants Only)

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