|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.pay.util.PaymentCredential
public class PaymentCredential
Field Summary | |
---|---|
private UserAddress |
address
|
private String |
buyerCompany
|
private String |
buyerFamilyName
|
private String |
buyerGivenName
|
private BigDecimal |
cardCode
The CCV, Card Code. |
private String |
cardCodeString
The CCV, Card Code. |
private BigDecimal |
cardNumber
The credit-card number |
private CredentialType |
credentialType
The type of credentials presented. |
private Date |
expiry
The expiry date of a credit card (used for validation) |
Constructor Summary | |
---|---|
PaymentCredential()
|
Method Summary | |
---|---|
void |
applyTo(net.authorize.admc.authnet.AimTransaction xact)
Apply a (credit-card only) set of payment credentials to an Authorize.Net one-time-purchase (AIM, Advanced Integration Method) object. |
void |
applyTo(net.authorize.arb.ARBNameAndAddress billTo)
TODO: document this method (brpocock, Sep 11, 2009) |
void |
applyTo(net.authorize.arb.ARBPayment payment)
Apply the credit-card information to the Authorize.net ARBPayment object. |
UserAddress |
getAddress()
|
String |
getBuyerCompany()
|
String |
getBuyerFamilyName()
|
String |
getBuyerGivenName()
|
CredentialType |
getCredentialType()
|
int |
getExpiryMonth()
TODO: document this method (brpocock, Sep 11, 2009) |
int |
getExpiryYear()
TODO: document this method (brpocock, Sep 11, 2009) |
static String |
getFriendlyName(CredentialType type)
|
private String |
getLastFour()
|
void |
populate(com.paypal.sdk.core.nvp.NVPEncoder encoder)
Apply credentials to a PayPal transaction |
void |
setBuyerCompany(String company)
TODO: document this method (brpocock, Sep 11, 2009) |
void |
setBuyerInfo(String buyerGivenName1,
String buyerFamilyName1,
UserAddress address1)
TODO: document this method (brpocock, Sep 23, 2009) |
void |
setCardCode(BigDecimal num)
|
void |
setCardCodeAsString(String code)
|
void |
setCardNumber(BigDecimal num)
|
void |
setCardNumber(String num)
Set a card number from a user-supplied string. |
void |
setCredentialType(CredentialType credentialType1)
|
void |
setExpiry(Date d)
|
void |
setIBCCard(String ibcCode)
|
void |
shred()
Discard all credential information |
String |
toString()
This is an overriding method. |
void |
verifyCredentials()
TODO: document this method (brpocock, Oct 13, 2009) |
static int |
verifyIBC(String ibcCode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private volatile UserAddress address
private volatile String buyerCompany
private volatile String buyerFamilyName
private volatile String buyerGivenName
private volatile BigDecimal cardCode
private volatile String cardCodeString
private volatile BigDecimal cardNumber
private CredentialType credentialType
CredentialType
for all
valid values. Note that at present we only actually support credit cards
and gift cards.
private Date expiry
Constructor Detail |
---|
public PaymentCredential()
Method Detail |
---|
public static String getFriendlyName(CredentialType type)
type
- a type of credentials
public static int verifyIBC(String ibcCode) throws NotImplementedException, AlreadyUsedException, NotFoundException
ibcCode
- WRITEME
NotImplementedException
- WRITEME
AlreadyUsedException
- WRITEME
NotFoundException
- WRITEMEpublic void applyTo(net.authorize.admc.authnet.AimTransaction xact)
Apply a (credit-card only) set of payment credentials to an Authorize.Net one-time-purchase (AIM, Advanced Integration Method) object.
At present, this (or applyTo(ARBPayment)
) are the only
supported way to extract the card information once it's entered into this
object; however, the last 4 digits of the card number are visible via
#toString()
xact
- An Authorize.Net transaction in the form of AimTransactionpublic void applyTo(net.authorize.arb.ARBNameAndAddress billTo)
billTo
- WRITEMEpublic void applyTo(net.authorize.arb.ARBPayment payment) throws UnsupportedCredentialException
Apply the credit-card information to the Authorize.net ARBPayment object.
At present, this (or applyTo(AimTransaction)
) are the
only supported way to extract the card information once it's
entered into this object; however, the last 4 digits of the card number
are visible via #toString()
payment
- The ARB Payment object to which we want to append the card
information.
UnsupportedCredentialException
- if this is not a credit-card
credentials bundlepublic UserAddress getAddress()
public String getBuyerCompany()
public String getBuyerFamilyName()
public String getBuyerGivenName()
public CredentialType getCredentialType()
public int getExpiryMonth()
public int getExpiryYear()
private String getLastFour()
toString()
and only accessible thereby.public void populate(com.paypal.sdk.core.nvp.NVPEncoder encoder)
encoder
- the PayPal transaction-in-progresspublic void setBuyerCompany(String company)
company
- WRITEMEpublic void setBuyerInfo(String buyerGivenName1, String buyerFamilyName1, UserAddress address1)
buyerGivenName1
- WRITEMEbuyerFamilyName1
- WRITEMEaddress1
- WRITEMEpublic void setCardCode(BigDecimal num)
num
- The CCV, Card Code Verification, number (3 or 4 digits)public void setCardCodeAsString(String code)
code
- The CCV, Card Code Verification, number (3 or 4 digits)public void setCardNumber(BigDecimal num)
num
- The credit-card number (usually 16 digits)public void setCardNumber(String num) throws NumberFormatException
num
- The presumed credit-card number, possibly containing spaces or
dashes.
NumberFormatException
- WRITEMEpublic void setCredentialType(CredentialType credentialType1)
credentialType1
- the credentialType to setpublic void setExpiry(Date d)
d
- The expiration date. Only the month and year are used: the day
can be "1" for validitypublic void setIBCCard(String ibcCode) throws NotImplementedException
ibcCode
- WRITEME
NotImplementedException
- WRITEMEpublic void shred()
public String toString()
toString
in class Object
Object.toString()
public void verifyCredentials() throws DataException
DataException
- WRITEME
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |