Class MPaymentTransaction

All Implemented Interfaces:
Serializable, Cloneable, Comparator<Object>, I_C_PaymentTransaction, I_Persistent, PaymentInterface, ProcessCall, Evaluatee

public class MPaymentTransaction extends X_C_PaymentTransaction implements ProcessCall, PaymentInterface
Online payment transaction
Author:
Elaine
See Also:
  • Constructor Details

    • MPaymentTransaction

      public MPaymentTransaction(Properties ctx, String C_PaymentTransaction_UU, String trxName)
      UUID based Constructor
      Parameters:
      ctx - Context
      C_PaymentTransaction_UU - UUID key
      trxName - Transaction
    • MPaymentTransaction

      public MPaymentTransaction(Properties ctx, int C_PaymentTransaction_ID, String trxName)
      Parameters:
      ctx -
      C_PaymentTransaction_ID -
      trxName -
    • MPaymentTransaction

      public MPaymentTransaction(Properties ctx, ResultSet rs, String trxName)
      Parameters:
      ctx -
      rs -
      trxName -
  • Method Details

    • beforeSave

      protected boolean beforeSave(boolean newRecord)
      Description copied from class: PO
      Called before Save for Pre-Save Operation
      Overrides:
      beforeSave in class PO
      Parameters:
      newRecord - new record
      Returns:
      true if record can be saved
    • setAmount

      public void setAmount(int C_Currency_ID, BigDecimal payAmt)
      Set payment amount and currency
      Parameters:
      C_Currency_ID -
      payAmt -
    • setCreditCard

      public boolean setCreditCard(String TrxType, String creditCardType, String creditCardNumber, String creditCardVV, int creditCardExpMM, int creditCardExpYY)
      Set credit card details
      Parameters:
      TrxType -
      creditCardType -
      creditCardNumber -
      creditCardVV -
      creditCardExpMM -
      creditCardExpYY -
      Returns:
      true if credit detail is valid
    • setCreditCard

      public boolean setCreditCard(String TrxType, String creditCardType, String creditCardNumber, String creditCardVV, String creditCardExp)
      Set credit card details
      Parameters:
      TrxType -
      creditCardType -
      creditCardNumber -
      creditCardVV -
      creditCardExp -
      Returns:
      true if credit card detail is valid
    • setPaymentProcessor

      public boolean setPaymentProcessor()
      Find and set bank account payment processor (C_BankAccount_Processor)
      Returns:
      true if success
    • setPaymentProcessor

      public boolean setPaymentProcessor(String tender, String CCType, int C_PaymentProcessor_ID)
      Find and set bank account payment processor (C_BankAccount_Processor)
      Parameters:
      tender -
      CCType -
      C_PaymentProcessor_ID -
      Returns:
      true if success
    • processOnline

      public boolean processOnline()
      Execute online payment processing
      Returns:
      true if approved
    • voidOnlineAuthorizationPaymentTransaction

      public boolean voidOnlineAuthorizationPaymentTransaction()
      Void online authorization (TRXTYPE_Authorization) of payment
      Returns:
      true if success
    • delayCaptureOnlineAuthorizationPaymentTransaction

      public boolean delayCaptureOnlineAuthorizationPaymentTransaction(int C_Invoice_ID)
      Perform online delay capture (TRXTYPE_DelayedCapture) of authorized (TRXTYPE_Authorization) payment.
      Parameters:
      C_Invoice_ID -
      Returns:
      true if success
    • getCreditCardName

      public String getCreditCardName()
      Returns:
      credit card type name (master card, visa, etc)
    • getCreditCardName

      public String getCreditCardName(String CreditCardType)
      Parameters:
      CreditCardType -
      Returns:
      name of credit card type
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Parameters:
      errorMessage -
    • getErrorMessage

      public String getErrorMessage()
      Returns:
      error message
    • createPayment

      public MPayment createPayment(String trxName)
      Create payment using details from this record
      Parameters:
      trxName -
      Returns:
      MPayment
    • startProcess

      public boolean startProcess(Properties ctx, ProcessInfo pi, Trx trx)
      Process Online Payment. Call processOnline() and save changes make to this record.
      Specified by:
      startProcess in interface ProcessCall
      Parameters:
      ctx - Context
      pi - Process Info
      trx - transaction
      Returns:
      true if success
    • setProcessUI

      public void setProcessUI(IProcessUI processUI)
      Specified by:
      setProcessUI in interface ProcessCall
    • getPO

      public PO getPO()
      Description copied from interface: PaymentInterface
      Get Persistent Object
      Specified by:
      getPO in interface PaymentInterface
      Returns:
      PO
    • copyFrom

      public static MPaymentTransaction copyFrom(MPaymentTransaction from, Timestamp dateTrx, String trxType, String orig_TrxID, String trxName)
      Create new payment transaction from existing payment transaction record
      Parameters:
      from - source payment transaction to copy from
      dateTrx -
      trxType -
      orig_TrxID -
      trxName -
      Returns:
      MPaymentTransaction created
    • getAuthorizationPaymentTransactionIDs

      public static int[] getAuthorizationPaymentTransactionIDs(int C_Order_ID, int C_Invoice_ID, String trxName)
      Get authorized credit card payment transactions that are pending delay capture
      Parameters:
      C_Order_ID -
      C_Invoice_ID -
      trxName -
      Returns:
      array of C_PaymentTransaction_ID
    • getAuthorizationPaymentTransactionIDs

      public static int[] getAuthorizationPaymentTransactionIDs(int[] orderIDList, int C_Invoice_ID, String trxName)
      Get authorized credit card payment transactions that are pending delay capture
      Parameters:
      orderIDList -
      C_Invoice_ID -
      trxName -
      Returns:
      array of C_PaymentTransaction_ID
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class X_C_PaymentTransaction
      Returns:
      info