All Implemented Interfaces:
Streamable, StreamReadable, StreamWritable, Row, AoservReadable, AoservStreamable, AoservWritable, SingleTableObject<Integer,Payment>

public final class Payment extends CachedObjectIntegerKey<Payment>
A CreditCardTransaction stores the complete history of credit card transactions.
Author:
AO Industries, Inc.
  • Constructor Details

  • Method Details

    • getCreditCardProcessor

      public Processor getCreditCardProcessor() throws SQLException, IOException
      Gets the credit card processor used for this transaction.
      Throws:
      SQLException
      IOException
    • 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:
      SQLException
      IOException
    • 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.

      See https://wikipedia.org/wiki/ISO_3166-1_alpha-2

      Throws:
      SQLException
      IOException
    • getEmailCustomer

      public boolean getEmailCustomer()
    • getMerchantEmail

      public Email getMerchantEmail()
    • getInvoiceNumber

      public String getInvoiceNumber()
    • getPurchaseOrderNumber

      public String getPurchaseOrderNumber()
    • getCreditCardCreatedBy

      public Administrator getCreditCardCreatedBy() throws SQLException, IOException
      Throws:
      SQLException
      IOException
    • getCreditCardPrincipalName

      public String getCreditCardPrincipalName()
      Gets the application-provided principal who added this credit card.
    • getCreditCardAccount

      public Account getCreditCardAccount() throws SQLException, IOException
      Throws:
      SQLException
      IOException
    • 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.

      See https://wikipedia.org/wiki/ISO_3166-1_alpha-2

      Throws:
      SQLException
      IOException
    • 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 the Administrator who authorized this transactions. This is the username of the account that has access to control credit card transactions.
      Throws:
      SQLException
      IOException
    • getAuthorizationPrincipalName

      public String getAuthorizationPrincipalName()
      Gets the application-specific username who authorized this transaction. For pure-AOServ data, this will contain the username of the Administrator who 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 the Administrator who captured this transactions. This is the username of the account that has access to control credit card transactions.
      Throws:
      SQLException
      IOException
    • getCapturePrincipalName

      public String getCapturePrincipalName()
      Gets the application-specific username who captured this transaction. For pure-AOServ data, this will contain the username of the Administrator who 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 the Administrator who voided this transactions. This is the username of the account that has access to control credit card transactions.
      Throws:
      SQLException
      IOException
    • getVoidPrincipalName

      public String getVoidPrincipalName()
      Gets the application-specific username who voided this transaction. For pure-AOServ data, this will contain the username of the Administrator who 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:
      getColumnImpl in class AoservObject<Integer,Payment>
    • getTableId

      public Table.TableId getTableId()
      Specified by:
      getTableId in class AoservObject<Integer,Payment>
    • init

      public void init(ResultSet result) throws SQLException
      Description copied from class: AoservObject
      Initializes this object from the raw database contents.
      Specified by:
      init in class AoservObject<Integer,Payment>
      Parameters:
      result - the ResultSet containing the row to copy into this object
      Throws:
      SQLException
    • read

      public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
      Specified by:
      read in interface AoservReadable
      Specified by:
      read in interface AoservStreamable
      Specified by:
      read in class AoservObject<Integer,Payment>
      Throws:
      IOException
    • write

      public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
      Specified by:
      write in interface AoservStreamable
      Specified by:
      write in interface AoservWritable
      Specified by:
      write in class AoservObject<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:
      IOException
      SQLException
    • 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:
      IOException
      SQLException