com.mikeblanton.paypal
Class PayPalData

java.lang.Object
  |
  +--com.mikeblanton.paypal.PayPalData
Direct Known Subclasses:
PayPalIPNData, PayPalPDTData

public class PayPalData
extends java.lang.Object

PayPalData is the base class for all IPN and PDT data responses. It can be extended to allow for other response types in the future. See the PayPal Integration Manual for a detailed description of these fields.

Version:
$Revision: 1.7 $
Author:
Michael Blanton

Field Summary
static java.lang.String FAIL
           
static java.lang.String SUCCESS
           
static java.lang.String UNVERIFIED
           
static java.lang.String VERIFIED
           
 
Constructor Summary
PayPalData()
           
PayPalData(java.io.InputStream _dataStream)
           
 
Method Summary
 java.lang.String getAddressCity()
          Returns the value of the PayPal field address_city
 java.lang.String getAddressCountry()
          Returns the value of the PayPal field address_country
 java.lang.String getAddressName()
          Returns the value of the PayPal field address_name
 java.lang.String getAddressState()
          Returns the value of the PayPal field address_state
 java.lang.String getAddressStatus()
          Returns the value of the PayPal field address_status
 java.lang.String getAddressStreet()
          Returns the value of the PayPal field address_street
 java.lang.String getAddressZip()
          Returns the value of the PayPal field address_zip
 java.lang.String getAuctionBuyerId()
          Returns the value of the PayPal field auction_buyer_id
 java.lang.String getAuctionClosingDate()
          Returns the value of the PayPal field auction_closing_date
 java.lang.String getAuctionMultiItem()
          Returns the value of the PayPal field auction_multi_item
 java.lang.String getBusiness()
          Returns the value of the PayPal field business
 java.lang.String getCustom()
          Returns the value of the PayPal field custom
 java.lang.String getExchangeRate()
          Returns the value of the PayPal field exchange_rate
 java.lang.String getFirstName()
          Returns the value of the PayPal field first_name
 java.lang.String getForAuction()
          Returns the value of the PayPal field for_auction
 java.lang.String getInvoice()
          Returns the value of the PayPal field invoice
 java.lang.String getItemName()
          Returns the value of the PayPal field item_name
 java.lang.String getItemName(int i)
          Returns the value of the PayPal field item_name{x}
 java.lang.String getItemNumber()
          Returns the value of the PayPal field item_number
 java.lang.String getItemNumber(int i)
          Returns the value of the PayPal field item_number{x}
 java.lang.String getLastName()
          Returns the value of the PayPal field last_name
 java.lang.String getMassPayTxnId(int i)
          Returns the value of the PayPal field masspay_txn_id_{x}
 java.lang.String getMcCurrency()
          Returns the value of the PayPal field mc_currency
 java.lang.String getMcFee()
          Returns the value of the PayPal field mc_fee
 java.lang.String getMcGross()
          Returns the value of the PayPal field mc_gross
 java.lang.String getMcGross(int i)
          Returns the value of the PayPal field mc_gross_{x}
 java.lang.String getMcHandling()
          Returns the value of the PayPal field mc_handling
 java.lang.String getMcHandling(int i)
          Returns the value of the PayPal field mc_handling{x}
 java.lang.String getMcShipping()
          Returns the value of the PayPal field mc_shipping
 java.lang.String getMcShipping(int i)
          Returns the value of the PayPal field mc_shipping{x}
 java.lang.String getMcTax(int i)
          Returns the value of the PayPal field mc_tax{x}
 java.lang.String getMemo()
          Returns the value of the PayPal field memo
 java.lang.String getNote()
          Returns the value of the PayPal field note
 java.lang.String getNumCartItems()
          Returns the value of the PayPal field num_cart_items
 java.lang.String getOptionName(int i)
          Returns the value of the PayPal field option_name{x}
 java.lang.String getOptionSelection(int i)
          Returns the value of the PayPal field option_selection{x}
 java.lang.String getParentTxnId()
          Returns the value of the PayPal field parent_txn_id
 java.lang.String getPayerBusinessName()
          Returns the value of the PayPal field payer_business_name
 java.lang.String getPayerEmail()
          Returns the value of the PayPal field payer_email
 java.lang.String getPayerId()
          Returns the value of the PayPal field payer_id
 java.lang.String getPayerStatus()
          Returns the value of the PayPal field payer_status
 java.lang.String getPaymentDate()
          Returns the value of the PayPal field payment_date
 java.lang.String getPaymentFee()
          Returns the value of the PayPal field payment_fee
 java.lang.String getPaymentFee(int i)
          Returns the value of the PayPal field payment_fee_{x}
 java.lang.String getPaymentGoss(int i)
          Returns the value of the PayPal field payment_gross_{x}
 java.lang.String getPaymentGross()
          Returns the value of the PayPal field payment_gross
 java.lang.String getPaymentStatus()
          Returns the value of the PayPal field payment_status
 java.lang.String getPaymentType()
          Returns the value of the PayPal field payment_type
 java.lang.String getPaymnetGross(int i)
          Returns the value of the PayPal field payment_gross_{x}
 java.lang.String getPendingReason()
          Returns the value of the PayPal field pending_reason
 java.lang.String getQuantity()
          Returns the value of the PayPal field quantity
 java.lang.String getQuantity(int i)
          Returns the value of the PayPal field quantity{x}
 java.lang.String getReasonCode()
          Returns the value of the PayPal field reason_code
 java.lang.String getReceiverEmail()
          Returns the value of the PayPal field receiver_email
 java.lang.String getReceiverEmail(int i)
          Returns the value of the PayPal field receiver_email_{x}
 java.lang.String getReceiverId()
          Returns the value of the PayPal field receiver_id
 java.lang.String getSettleAmount()
          Returns the value of the PayPal field settle_amount
 java.lang.String getSettleCurrency()
          Returns the value of the PayPal field settle_currency
 java.lang.String getStatus(int i)
          Returns the value of the PayPal field status_{x}
 java.lang.String getTax()
          Returns the value of the PayPal field tax
 java.lang.String getTax(int i)
          Returns the value of the PayPal field tax{x}
 java.lang.String getTransactionId()
           
 java.lang.String getTxnId()
          Returns the value of the PayPal field txn_id
 java.lang.String getTxnType()
          Returns the value of the PayPal field txn_type
 java.lang.String getUniqueId(int i)
          Returns the value of the PayPal field unique_id_{x}
 java.lang.String getValue(java.lang.String _name)
           
 java.lang.String getVerifySign()
          Returns the value of the PayPal field verify_sign
 boolean isValid()
           
protected  void setValid(boolean valid)
           
protected  void setValue(java.lang.String _name, java.lang.String _value)
           
 java.lang.String toDetailedString()
          Outputs the Data as a String, the first line being a Formatted Date/Time Stamp (----- MMM DD, YYYY hh:mm:ss {AM/PM} -----), followed by each Name/Value Pair on a new line, followed by ----- END -----.
 java.lang.String toString()
          Outputs the Data as a String with each Name/Value Pair on a new line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VERIFIED

public static final java.lang.String VERIFIED

UNVERIFIED

public static final java.lang.String UNVERIFIED

SUCCESS

public static final java.lang.String SUCCESS

FAIL

public static final java.lang.String FAIL
Constructor Detail

PayPalData

public PayPalData()

PayPalData

public PayPalData(java.io.InputStream _dataStream)
           throws java.io.IOException,
                  PayPalException
Method Detail

getValue

public java.lang.String getValue(java.lang.String _name)

setValue

protected void setValue(java.lang.String _name,
                        java.lang.String _value)

isValid

public boolean isValid()
Returns:
Returns the valid.

setValid

protected void setValid(boolean valid)
Parameters:
valid - The valid to set.

getTransactionId

public java.lang.String getTransactionId()

getBusiness

public java.lang.String getBusiness()
Returns the value of the PayPal field business
Returns:
 

getReceiverEmail

public java.lang.String getReceiverEmail()
Returns the value of the PayPal field receiver_email
Returns:
 

getReceiverId

public java.lang.String getReceiverId()
Returns the value of the PayPal field receiver_id
Returns:
 

getItemName

public java.lang.String getItemName()
Returns the value of the PayPal field item_name
Returns:
 

getItemNumber

public java.lang.String getItemNumber()
Returns the value of the PayPal field item_number
Returns:
 

getItemNumber

public java.lang.String getItemNumber(int i)
Returns the value of the PayPal field item_number{x}
Parameters:
i -  
Returns:
 

getQuantity

public java.lang.String getQuantity()
Returns the value of the PayPal field quantity
Returns:
 

getQuantity

public java.lang.String getQuantity(int i)
Returns the value of the PayPal field quantity{x}
Parameters:
i -  
Returns:
 

getInvoice

public java.lang.String getInvoice()
Returns the value of the PayPal field invoice
Returns:
 

getCustom

public java.lang.String getCustom()
Returns the value of the PayPal field custom
Returns:
 

getMemo

public java.lang.String getMemo()
Returns the value of the PayPal field memo
Returns:
 

getNote

public java.lang.String getNote()
Returns the value of the PayPal field note
Returns:
 

getTax

public java.lang.String getTax()
Returns the value of the PayPal field tax
Returns:
 

getTax

public java.lang.String getTax(int i)
Returns the value of the PayPal field tax{x}
Parameters:
i -  
Returns:
 

getOptionName

public java.lang.String getOptionName(int i)
Returns the value of the PayPal field option_name{x}
Parameters:
i -  
Returns:
 

getOptionSelection

public java.lang.String getOptionSelection(int i)
Returns the value of the PayPal field option_selection{x}
Parameters:
i -  
Returns:
 

getNumCartItems

public java.lang.String getNumCartItems()
Returns the value of the PayPal field num_cart_items
Returns:
 

getMcGross

public java.lang.String getMcGross(int i)
Returns the value of the PayPal field mc_gross_{x}
Parameters:
i -  
Returns:
 

getMcHandling

public java.lang.String getMcHandling(int i)
Returns the value of the PayPal field mc_handling{x}
Parameters:
i -  
Returns:
 

getMcShipping

public java.lang.String getMcShipping(int i)
Returns the value of the PayPal field mc_shipping{x}
Parameters:
i -  
Returns:
 

getPaymentStatus

public java.lang.String getPaymentStatus()
Returns the value of the PayPal field payment_status
Returns:
 

getPendingReason

public java.lang.String getPendingReason()
Returns the value of the PayPal field pending_reason
Returns:
 

getReasonCode

public java.lang.String getReasonCode()
Returns the value of the PayPal field reason_code
Returns:
 

getPaymentDate

public java.lang.String getPaymentDate()
Returns the value of the PayPal field payment_date
Returns:
 

getPaymnetGross

public java.lang.String getPaymnetGross(int i)
Returns the value of the PayPal field payment_gross_{x}
Parameters:
i -  
Returns:
 

getTxnId

public java.lang.String getTxnId()
Returns the value of the PayPal field txn_id
Returns:
 

getParentTxnId

public java.lang.String getParentTxnId()
Returns the value of the PayPal field parent_txn_id
Returns:
 

getTxnType

public java.lang.String getTxnType()
Returns the value of the PayPal field txn_type
Returns:
 

getPaymentType

public java.lang.String getPaymentType()
Returns the value of the PayPal field payment_type
Returns:
 

getMcGross

public java.lang.String getMcGross()
Returns the value of the PayPal field mc_gross
Returns:
 

getMcFee

public java.lang.String getMcFee()
Returns the value of the PayPal field mc_fee
Returns:
 

getMcCurrency

public java.lang.String getMcCurrency()
Returns the value of the PayPal field mc_currency
Returns:
 

getMcHandling

public java.lang.String getMcHandling()
Returns the value of the PayPal field mc_handling
Returns:
 

getMcShipping

public java.lang.String getMcShipping()
Returns the value of the PayPal field mc_shipping
Returns:
 

getSettleAmount

public java.lang.String getSettleAmount()
Returns the value of the PayPal field settle_amount
Returns:
 

getSettleCurrency

public java.lang.String getSettleCurrency()
Returns the value of the PayPal field settle_currency
Returns:
 

getExchangeRate

public java.lang.String getExchangeRate()
Returns the value of the PayPal field exchange_rate
Returns:
 

getPaymentGross

public java.lang.String getPaymentGross()
Returns the value of the PayPal field payment_gross
Returns:
 

getPaymentFee

public java.lang.String getPaymentFee()
Returns the value of the PayPal field payment_fee
Returns:
 

getForAuction

public java.lang.String getForAuction()
Returns the value of the PayPal field for_auction
Returns:
 

getAuctionBuyerId

public java.lang.String getAuctionBuyerId()
Returns the value of the PayPal field auction_buyer_id
Returns:
 

getAuctionClosingDate

public java.lang.String getAuctionClosingDate()
Returns the value of the PayPal field auction_closing_date
Returns:
 

getAuctionMultiItem

public java.lang.String getAuctionMultiItem()
Returns the value of the PayPal field auction_multi_item
Returns:
 

getFirstName

public java.lang.String getFirstName()
Returns the value of the PayPal field first_name
Returns:
 

getLastName

public java.lang.String getLastName()
Returns the value of the PayPal field last_name
Returns:
 

getPayerBusinessName

public java.lang.String getPayerBusinessName()
Returns the value of the PayPal field payer_business_name
Returns:
 

getAddressName

public java.lang.String getAddressName()
Returns the value of the PayPal field address_name
Returns:
 

getAddressStreet

public java.lang.String getAddressStreet()
Returns the value of the PayPal field address_street
Returns:
 

getAddressCity

public java.lang.String getAddressCity()
Returns the value of the PayPal field address_city
Returns:
 

getAddressState

public java.lang.String getAddressState()
Returns the value of the PayPal field address_state
Returns:
 

getAddressZip

public java.lang.String getAddressZip()
Returns the value of the PayPal field address_zip
Returns:
 

getAddressCountry

public java.lang.String getAddressCountry()
Returns the value of the PayPal field address_country
Returns:
 

getAddressStatus

public java.lang.String getAddressStatus()
Returns the value of the PayPal field address_status
Returns:
 

getPayerEmail

public java.lang.String getPayerEmail()
Returns the value of the PayPal field payer_email
Returns:
 

getPayerId

public java.lang.String getPayerId()
Returns the value of the PayPal field payer_id
Returns:
 

getPayerStatus

public java.lang.String getPayerStatus()
Returns the value of the PayPal field payer_status
Returns:
 

getMassPayTxnId

public java.lang.String getMassPayTxnId(int i)
Returns the value of the PayPal field masspay_txn_id_{x}
Parameters:
i -  
Returns:
 

getReceiverEmail

public java.lang.String getReceiverEmail(int i)
Returns the value of the PayPal field receiver_email_{x}
Parameters:
i -  
Returns:
 

getPaymentGoss

public java.lang.String getPaymentGoss(int i)
Returns the value of the PayPal field payment_gross_{x}
Parameters:
i -  
Returns:
 

getStatus

public java.lang.String getStatus(int i)
Returns the value of the PayPal field status_{x}
Parameters:
i -  
Returns:
 

getPaymentFee

public java.lang.String getPaymentFee(int i)
Returns the value of the PayPal field payment_fee_{x}
Parameters:
i -  
Returns:
 

getUniqueId

public java.lang.String getUniqueId(int i)
Returns the value of the PayPal field unique_id_{x}
Parameters:
i -  
Returns:
 

getItemName

public java.lang.String getItemName(int i)
Returns the value of the PayPal field item_name{x}
Parameters:
i -  
Returns:
 

getMcTax

public java.lang.String getMcTax(int i)
Returns the value of the PayPal field mc_tax{x}
Parameters:
i -  
Returns:
 

getVerifySign

public java.lang.String getVerifySign()
Returns the value of the PayPal field verify_sign
Returns:
 

toString

public java.lang.String toString()
Outputs the Data as a String with each Name/Value Pair on a new line.
Overrides:
toString in class java.lang.Object

toDetailedString

public java.lang.String toDetailedString()
Outputs the Data as a String, the first line being a Formatted Date/Time Stamp (----- MMM DD, YYYY hh:mm:ss {AM/PM} -----), followed by each Name/Value Pair on a new line, followed by ----- END -----.
Returns: