- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<Payment>
-
- com.aoindustries.aoserv.client.payment.Payment
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,Payment>
public final class Payment extends CachedObjectIntegerKey<Payment>
ACreditCardTransactionstores the complete history of credit card transactions.- Author:
- AO Industries, Inc.
-
-
Field Summary
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description Payment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthorizeCompleted(String authorizationCommunicationResult, String authorizationProviderErrorCode, String authorizationErrorCode, String authorizationProviderErrorMessage, String authorizationProviderUniqueId, String authorizationResult_providerReplacementMaskedCardNumber, String authorizationResult_replacementMaskedCardNumber, String authorizationResult_providerReplacementExpiration, Byte authorizationResult_replacementExpirationMonth, Short authorizationResult_replacementExpirationYear, String providerApprovalResult, String approvalResult, String providerDeclineReason, String declineReason, String providerReviewReason, String reviewReason, String providerCvvResult, String cvvResult, String providerAvsResult, String avsResult, String approvalCode, String status)Called when an authorization has been completed.AccountgetAccount()For AOServ sub-account support, this is the account that is making the payment.Account.NamegetAccount_name()MoneygetAmount()Gets the amount of the transaction.AdministratorgetAuthorizationAdministrator()Gets theAdministratorwho authorized this transactions.StringgetAuthorizationApprovalCode()StringgetAuthorizationApprovalResult()StringgetAuthorizationAvsResult()StringgetAuthorizationCommunicationResult()StringgetAuthorizationCvvResult()StringgetAuthorizationDeclineReason()StringgetAuthorizationErrorCode()StringgetAuthorizationPrincipalName()Gets the application-specific username who authorized this transaction.StringgetAuthorizationProviderApprovalResult()StringgetAuthorizationProviderAvsResult()StringgetAuthorizationProviderCvvResult()StringgetAuthorizationProviderDeclineReason()StringgetAuthorizationProviderErrorCode()StringgetAuthorizationProviderErrorMessage()StringgetAuthorizationProviderReplacementExpiration()StringgetAuthorizationProviderReplacementMaskedCardNumber()StringgetAuthorizationProviderReviewReason()StringgetAuthorizationProviderUniqueId()BytegetAuthorizationReplacementExpirationMonth()ShortgetAuthorizationReplacementExpirationYear()StringgetAuthorizationReplacementMaskedCardNumber()StringgetAuthorizationReviewReason()UnmodifiableTimestampgetAuthorizationTime()Gets the time of the authorization if not available.AdministratorgetCaptureAdministrator()Gets theAdministratorwho captured this transactions.StringgetCaptureCommunicationResult()StringgetCaptureErrorCode()StringgetCapturePrincipalName()Gets the application-specific username who captured this transaction.StringgetCaptureProviderErrorCode()StringgetCaptureProviderErrorMessage()StringgetCaptureProviderUniqueId()UnmodifiableTimestampgetCaptureTime()Gets the time of the capture.protected ObjectgetColumnImpl(int i)BytegetCreditCard_expirationMonth()ShortgetCreditCard_expirationYear()AccountgetCreditCardAccount()StringgetCreditCardCity()StringgetCreditCardComments()StringgetCreditCardCompanyName()CountryCodegetCreditCardCountryCode()Gets the credit card two-digit ISO 3166-1 alpha-2 country code.AdministratorgetCreditCardCreatedBy()StringgetCreditCardCustomerId()StringgetCreditCardCustomerTaxId()EmailgetCreditCardEmail()StringgetCreditCardFax()StringgetCreditCardFirstName()StringgetCreditCardGroupName()StringgetCreditCardLastName()StringgetCreditCardMaskedCardNumber()StringgetCreditCardPhone()StringgetCreditCardPostalCode()StringgetCreditCardPrincipalName()Gets the application-provided principal who added this credit card.ProcessorgetCreditCardProcessor()Gets the credit card processor used for this transaction.StringgetCreditCardProviderUniqueId()StringgetCreditCardState()StringgetCreditCardStreetAddress1()StringgetCreditCardStreetAddress2()StringgetDescription()intgetDuplicateWindow()Gets the duplicate detection window in seconds.MoneygetDutyAmount()Gets the optional duty amount for this transaction.booleangetEmailCustomer()StringgetGroupName()Gets the group name for this transaction.StringgetInvoiceNumber()EmailgetMerchantEmail()StringgetOrderNumber()Gets the order number.StringgetPurchaseOrderNumber()MoneygetShippingAmount()Gets the optional shipping amount for this transaction.StringgetShippingCity()StringgetShippingCompanyName()CountryCodegetShippingCountryCode()Gets the shipping two-digit ISO 3166-1 alpha-2 country code.StringgetShippingFirstName()StringgetShippingLastName()StringgetShippingPostalCode()StringgetShippingState()StringgetShippingStreetAddress1()StringgetShippingStreetAddress2()StringgetStatus()Table.TableIDgetTableID()MoneygetTaxAmount()Gets the optional tax amount of the transaction.booleangetTaxExempt()Gets the taxExempt flag for this transaction.booleangetTestMode()Gets the test mode flag.AdministratorgetVoidAdministrator()Gets theAdministratorwho voided this transactions.StringgetVoidCommunicationResult()StringgetVoidErrorCode()StringgetVoidPrincipalName()Gets the application-specific username who voided this transaction.StringgetVoidProviderErrorCode()StringgetVoidProviderErrorMessage()StringgetVoidProviderUniqueId()UnmodifiableTimestampgetVoidTime()Gets the time of the void.voidinit(ResultSet result)Initializes this object from the raw database contents.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)voidsaleCompleted(String authorizationCommunicationResult, String authorizationProviderErrorCode, String authorizationErrorCode, String authorizationProviderErrorMessage, String authorizationProviderUniqueId, String authorizationResult_providerReplacementMaskedCardNumber, String authorizationResult_replacementMaskedCardNumber, String authorizationResult_providerReplacementExpiration, Byte authorizationResult_replacementExpirationMonth, Short authorizationResult_replacementExpirationYear, String providerApprovalResult, String approvalResult, String providerDeclineReason, String declineReason, String providerReviewReason, String reviewReason, String providerCvvResult, String cvvResult, String providerAvsResult, String avsResult, String approvalCode, Timestamp captureTime, String capturePrincipalName, String captureCommunicationResult, String captureProviderErrorCode, String captureErrorCode, String captureProviderErrorMessage, String captureProviderUniqueId, String status)Called when a sale (combined authorization and capture) has been completed.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode, toStringImpl
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
-
-
-
Method Detail
-
getCreditCardProcessor
public Processor getCreditCardProcessor() throws SQLException, IOException
Gets the credit card processor used for this transaction.- Throws:
SQLExceptionIOException
-
getAccount_name
public Account.Name getAccount_name()
-
getAccount
public Account getAccount() throws SQLException, IOException
For AOServ sub-account support, this is the account that is making the payment. For application-only use (not a sub-account to parent-account payment), use the same account as the owner of the credit card processor.- Throws:
SQLExceptionIOException
-
getGroupName
public String getGroupName()
Gets the group name for this transaction. This is an arbitrary accounting name or grouping level.
-
getTestMode
public boolean getTestMode()
Gets the test mode flag.
-
getDuplicateWindow
public int getDuplicateWindow()
Gets the duplicate detection window in seconds.
-
getOrderNumber
public String getOrderNumber()
Gets the order number.
-
getAmount
public Money getAmount()
Gets the amount of the transaction. This amount should not include any tax, shipping charges, or duty. Thus the total amount of the transaction is the amount + taxAmount + shippingAmount + dutyAmount.
-
getTaxAmount
public Money getTaxAmount()
Gets the optional tax amount of the transaction.
-
getTaxExempt
public boolean getTaxExempt()
Gets the taxExempt flag for this transaction.
-
getShippingAmount
public Money getShippingAmount()
Gets the optional shipping amount for this transaction.
-
getDutyAmount
public Money getDutyAmount()
Gets the optional duty amount for this transaction.
-
getShippingFirstName
public String getShippingFirstName()
-
getShippingLastName
public String getShippingLastName()
-
getShippingCompanyName
public String getShippingCompanyName()
-
getShippingStreetAddress1
public String getShippingStreetAddress1()
-
getShippingStreetAddress2
public String getShippingStreetAddress2()
-
getShippingCity
public String getShippingCity()
-
getShippingState
public String getShippingState()
-
getShippingPostalCode
public String getShippingPostalCode()
-
getShippingCountryCode
public CountryCode getShippingCountryCode() throws SQLException, IOException
Gets the shipping two-digit ISO 3166-1 alpha-2 country code.- Throws:
SQLExceptionIOException
-
getEmailCustomer
public boolean getEmailCustomer()
-
getMerchantEmail
public Email getMerchantEmail()
-
getInvoiceNumber
public String getInvoiceNumber()
-
getPurchaseOrderNumber
public String getPurchaseOrderNumber()
-
getCreditCardCreatedBy
public Administrator getCreditCardCreatedBy() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getCreditCardPrincipalName
public String getCreditCardPrincipalName()
Gets the application-provided principal who added this credit card.
-
getCreditCardAccount
public Account getCreditCardAccount() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getCreditCardGroupName
public String getCreditCardGroupName()
-
getCreditCardProviderUniqueId
public String getCreditCardProviderUniqueId()
-
getCreditCardMaskedCardNumber
public String getCreditCardMaskedCardNumber()
-
getCreditCard_expirationMonth
public Byte getCreditCard_expirationMonth()
-
getCreditCard_expirationYear
public Short getCreditCard_expirationYear()
-
getCreditCardFirstName
public String getCreditCardFirstName()
-
getCreditCardLastName
public String getCreditCardLastName()
-
getCreditCardCompanyName
public String getCreditCardCompanyName()
-
getCreditCardEmail
public Email getCreditCardEmail()
-
getCreditCardPhone
public String getCreditCardPhone()
-
getCreditCardFax
public String getCreditCardFax()
-
getCreditCardCustomerId
public String getCreditCardCustomerId()
-
getCreditCardCustomerTaxId
public String getCreditCardCustomerTaxId()
-
getCreditCardStreetAddress1
public String getCreditCardStreetAddress1()
-
getCreditCardStreetAddress2
public String getCreditCardStreetAddress2()
-
getCreditCardCity
public String getCreditCardCity()
-
getCreditCardState
public String getCreditCardState()
-
getCreditCardPostalCode
public String getCreditCardPostalCode()
-
getCreditCardCountryCode
public CountryCode getCreditCardCountryCode() throws SQLException, IOException
Gets the credit card two-digit ISO 3166-1 alpha-2 country code.- Throws:
SQLExceptionIOException
-
getCreditCardComments
public String getCreditCardComments()
-
getAuthorizationTime
public UnmodifiableTimestamp getAuthorizationTime()
Gets the time of the authorization if not available.
-
getAuthorizationAdministrator
public Administrator getAuthorizationAdministrator() throws SQLException, IOException
Gets theAdministratorwho authorized this transactions. This is the username of the account that has access to control credit card transactions.- Throws:
SQLExceptionIOException
-
getAuthorizationPrincipalName
public String getAuthorizationPrincipalName()
Gets the application-specific username who authorized this transaction. For pure-AOServ data, this will contain the username of theAdministratorwho was logged in and made the payment.
-
getAuthorizationCommunicationResult
public String getAuthorizationCommunicationResult()
-
getAuthorizationProviderErrorCode
public String getAuthorizationProviderErrorCode()
-
getAuthorizationErrorCode
public String getAuthorizationErrorCode()
-
getAuthorizationProviderErrorMessage
public String getAuthorizationProviderErrorMessage()
-
getAuthorizationProviderUniqueId
public String getAuthorizationProviderUniqueId()
-
getAuthorizationProviderReplacementMaskedCardNumber
public String getAuthorizationProviderReplacementMaskedCardNumber()
-
getAuthorizationReplacementMaskedCardNumber
public String getAuthorizationReplacementMaskedCardNumber()
-
getAuthorizationProviderReplacementExpiration
public String getAuthorizationProviderReplacementExpiration()
-
getAuthorizationReplacementExpirationMonth
public Byte getAuthorizationReplacementExpirationMonth()
-
getAuthorizationReplacementExpirationYear
public Short getAuthorizationReplacementExpirationYear()
-
getAuthorizationProviderApprovalResult
public String getAuthorizationProviderApprovalResult()
-
getAuthorizationApprovalResult
public String getAuthorizationApprovalResult()
-
getAuthorizationProviderDeclineReason
public String getAuthorizationProviderDeclineReason()
-
getAuthorizationDeclineReason
public String getAuthorizationDeclineReason()
-
getAuthorizationProviderReviewReason
public String getAuthorizationProviderReviewReason()
-
getAuthorizationReviewReason
public String getAuthorizationReviewReason()
-
getAuthorizationProviderCvvResult
public String getAuthorizationProviderCvvResult()
-
getAuthorizationCvvResult
public String getAuthorizationCvvResult()
-
getAuthorizationProviderAvsResult
public String getAuthorizationProviderAvsResult()
-
getAuthorizationAvsResult
public String getAuthorizationAvsResult()
-
getAuthorizationApprovalCode
public String getAuthorizationApprovalCode()
-
getCaptureTime
public UnmodifiableTimestamp getCaptureTime()
Gets the time of the capture.
-
getCaptureAdministrator
public Administrator getCaptureAdministrator() throws SQLException, IOException
Gets theAdministratorwho captured this transactions. This is the username of the account that has access to control credit card transactions.- Throws:
SQLExceptionIOException
-
getCapturePrincipalName
public String getCapturePrincipalName()
Gets the application-specific username who captured this transaction. For pure-AOServ data, this will contain the username of theAdministratorwho was logged in and initiated the capture.
-
getCaptureCommunicationResult
public String getCaptureCommunicationResult()
-
getCaptureProviderErrorCode
public String getCaptureProviderErrorCode()
-
getCaptureErrorCode
public String getCaptureErrorCode()
-
getCaptureProviderErrorMessage
public String getCaptureProviderErrorMessage()
-
getCaptureProviderUniqueId
public String getCaptureProviderUniqueId()
-
getVoidTime
public UnmodifiableTimestamp getVoidTime()
Gets the time of the void.
-
getVoidAdministrator
public Administrator getVoidAdministrator() throws SQLException, IOException
Gets theAdministratorwho voided this transactions. This is the username of the account that has access to control credit card transactions.- Throws:
SQLExceptionIOException
-
getVoidPrincipalName
public String getVoidPrincipalName()
Gets the application-specific username who voided this transaction. For pure-AOServ data, this will contain the username of theAdministratorwho was logged in and caused the void.
-
getVoidCommunicationResult
public String getVoidCommunicationResult()
-
getVoidProviderErrorCode
public String getVoidProviderErrorCode()
-
getVoidErrorCode
public String getVoidErrorCode()
-
getVoidProviderErrorMessage
public String getVoidProviderErrorMessage()
-
getVoidProviderUniqueId
public String getVoidProviderUniqueId()
-
getStatus
public String getStatus()
-
getDescription
public String getDescription()
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,Payment>
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,Payment>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,Payment>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,Payment>- Throws:
IOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,Payment>- Throws:
IOException
-
saleCompleted
public void saleCompleted(String authorizationCommunicationResult, String authorizationProviderErrorCode, String authorizationErrorCode, String authorizationProviderErrorMessage, String authorizationProviderUniqueId, String authorizationResult_providerReplacementMaskedCardNumber, String authorizationResult_replacementMaskedCardNumber, String authorizationResult_providerReplacementExpiration, Byte authorizationResult_replacementExpirationMonth, Short authorizationResult_replacementExpirationYear, String providerApprovalResult, String approvalResult, String providerDeclineReason, String declineReason, String providerReviewReason, String reviewReason, String providerCvvResult, String cvvResult, String providerAvsResult, String avsResult, String approvalCode, Timestamp captureTime, String capturePrincipalName, String captureCommunicationResult, String captureProviderErrorCode, String captureErrorCode, String captureProviderErrorMessage, String captureProviderUniqueId, String status) throws IOException, SQLException
Called when a sale (combined authorization and capture) has been completed.- Throws:
IOExceptionSQLException
-
authorizeCompleted
public void authorizeCompleted(String authorizationCommunicationResult, String authorizationProviderErrorCode, String authorizationErrorCode, String authorizationProviderErrorMessage, String authorizationProviderUniqueId, String authorizationResult_providerReplacementMaskedCardNumber, String authorizationResult_replacementMaskedCardNumber, String authorizationResult_providerReplacementExpiration, Byte authorizationResult_replacementExpirationMonth, Short authorizationResult_replacementExpirationYear, String providerApprovalResult, String approvalResult, String providerDeclineReason, String declineReason, String providerReviewReason, String reviewReason, String providerCvvResult, String cvvResult, String providerAvsResult, String avsResult, String approvalCode, String status) throws IOException, SQLException
Called when an authorization has been completed.- Throws:
IOExceptionSQLException
-
-