paypalnvp.request
Class DoReferenceTransaction

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

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

Process a payment from a buyer’s account, which is identified by a previous transaction.

See Also:
Serialized Form

Constructor Summary
DoReferenceTransaction(java.lang.String referenceId, Payment payment, CreditCard card, 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 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 setShipToAddress(ShipToAddress address)
           
 void setSoftDescriptor(java.lang.String softDescriptor)
          The soft descriptor is a per transaction description of the payment that is passed to the consumer's credit card statement.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoReferenceTransaction

public DoReferenceTransaction(java.lang.String referenceId,
                              Payment payment,
                              CreditCard card,
                              PayerInformation payer,
                              Address address)
Parameters:
referenceId - A transaction ID from a previous purchase, such as a credit card charge using the DoDirectPayment API, or a billing agreement ID.
payment -
card -
payer -
address -
Method Detail

setPaymentAction

public void setPaymentAction(PaymentAction action)
                      throws java.lang.IllegalArgumentException
How you want to obtain payment 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)

setSoftDescriptor

public void setSoftDescriptor(java.lang.String softDescriptor)
                       throws java.lang.IllegalArgumentException
The soft descriptor is a per transaction description of the payment that is passed to the consumer's credit card statement. If a value for the soft descriptor field is provided, the full descriptor displayed on the customer's statement has the following format: <PP * | PAYPAL *><Merchant descriptor as set in the Payment Receiving Preferences><1 space><soft descriptor> The soft descriptor does not include the phone number, which can be toggled between the merchant's customer service number and PayPal's customer service number.

Parameters:
softDescriptor - can contain only the following characters: Alphanumeric characters, - (dash), * (asterisk), . (period), {space}. The maximum length of the total soft descriptor is 22 characters. Of this, either 4 or 8 characters are used by the PayPal prefix shown in the data format. Thus, the maximum length of the soft descriptor passed in the API request is:22 - len(<PP * | PAYPAL *>) - len(<Descriptor set in Payment Receiving Preferences> + 1) For example, assume the following conditions:
  • The PayPal prefix toggle is set to PAYPAL * in PayPal’s admin tools.
  • The merchant descriptor set in the Payment Receiving Preferences is set to EBAY.
  • The soft descriptor is passed in as JanesFlowerGifts LLC.
The resulting descriptor string on the credit card would be: PAYPAL *EBAY JanesFlow
Throws:
java.lang.IllegalArgumentException

setShipToAddress

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

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