Transaction update bean

The transaction update bean is the primary facility to apply changes to a transaction in the Transaction Server.

The payload class name for the transaction update bean is com.ibm.paydir.ima.txacc.app.bridge.payment.PaymentUpdateBean.

By using the bean, a user can re-pocket a transaction, modify its user code, or change any of the MICR fields. When the update transaction request contains a field that is present in the item table and not in the payment table, the Transaction Server creates a new version of the item with the specified fields set to the specified values. It increments the item version number and adds the new version to the transaction. If the amount is changed, the Transaction Server adjusts the batch (ICL) and segment amount totals to account for the new amount.

The update transaction request fails if the specified transaction is absent. The request does not have enough information to insert a transaction when the specified transaction is absent.

When it is requested, the transaction update bean returns ACTION_UPDATE as its action code value. It can also be queried for the payment ID being affected by the update.

The caller can use the mutator methods that are shown in the following table to configure the transaction update bean.
Table 1. ACTION_UPDATE request
Method name Takes data type Description
setRecordType Short Updates the transaction record type code.
setDocumentType Short Updates the transaction document type code.
setPocket Short Updates the item pocket.
setBalanceOrder Double Updates the balancing order of the transaction (moves the transaction).
setMicrField Integer, String/Byte[] Updates the indexed item codeline field.
setMicrFieldValidity Integer, Boolean Updates the indexed item codeline validity field.
setAmount Long Updates the item codeline field 1 as an amount.
setProcessControl String Updates the item codeline field 2 as a string.
setAccountNumber String Updates the item codeline field 3 as a string.
setTransitRouting String Updates the item codeline field 5 as a string.
setEpc String Updates the item codeline field 6 as a string.
setAuxOnUs String Updates the item codeline field 7 as a string.
setOriginalMicrAmount String Updates the item original MICR amount field.
setOriginalMicrOnUs String Updates the item original MICR on us field.
setOriginalMicrRouting String Updates the item original MICR transit routing field.
setOriginalMicrEpc String Updates the item original MICR EPC field.
setOriginalMicrAuxOnUs String Updates the item original MICR auxiliary on us field.
setCurrencyCode String Updates the transaction currency code.
setAutoSelect Boolean Updates the transaction automatic selection indicator.
setControlDocument Boolean Updates the transaction control document indicator.
setCredit Boolean Updates the transaction credit indicator.
setOnus Boolean Updates the transaction on us indicator.
setDuplicate Short Updates the transaction duplicate setting.
setSuspectFlag Boolean Updates the transaction suspect indicator.
setSuspectReviewId String Updates the transaction suspect review operator ID.
setDisposition Short Updates the transaction disposition code (holdover, return, exception).
setReturnReason String Updates the transaction return reason code (for disposition of return).
setClearingChannel Short Updates the transaction clearing channel code.
setAutoCorrected String Updates the automatically corrected specification.
setPresentmentDate String Updates the transaction presentment date.
setXoutResult Short Updates the transaction XOUT result code.
setUserCode Short Updates the transaction user code.
setUserField String Updates the transaction user field.
setEndpointId String Updates the transaction endpoint ID.
setEndpointType Short Updates the transaction endpoint type code.
setRepairable Boolean Updates the transaction repairable indicator.
setReviewable Boolean Updates the transaction reviewable indicator.
setValidationError Boolean Updates the validation error indicator.
setValidationReviewId String Updates the transaction validation review ID.
setHoldover Short Updates the transaction holdover field.
setOcrMicrAmount String Updates the transaction OCR MICR amount field.
setOcrMicrPC String Updates the transaction OCR MICR PC field.
setOcrMicrAccount String Updates the transaction OCR MICR account field.
setOcrMicrField4 String Updates the transaction OCR MICR field 4.
setOcrMicrRT String Updates the transaction OCR MICR transit routing field.
setOcrMicrEpc String Updates the transaction OCR MICR EPC field.
setOcrMicrAuxonus String Updates the transaction OCR MICR auxiliary on us field.
setImgCompFailedIIA Char Updates the transaction failed for image compliance field.
setImgCompFailedIQA Char Updates the transaction failed for image compliance field.
setImgCompFailedTIFF Char Updates the transaction failed for TIFF field.
setCreditAvailableDate Timestamp Updates the transaction credit availability date field.
setCreditAvailableDays Short Updates the transaction credit availability days field.
setPresentmentAvailableDays Short Updates the transaction presentment availability days field.
setItemBillingCode String Updates the transaction item billing code field.
setBofdRoutingNumber String Updates the transaction bank of first deposit transit routing field.
setBofdBusinessDate String Updates the transaction bank of first deposit business date field.
setBofdSeqNumber String Updates the transaction bank of first deposit sequence number field.
setBofdValidRoutingNumber Short Updates the transaction bank of first deposit transit routing validity indicator.
setBofdValidBusinessDate Short Updates the transaction bank of first deposit business date validity indicator.
setBofdValidSeqNum Short Updates the transaction bank of first deposit sequence number validity indicator.

In addition, the user can add their own fields to the Payment_User table. This table is foreign keyed to the PAYMENT table. The user fields can have any of the primary database types, such as INTEGER, SMALLINT, or TIMESTAMP.

The transaction update bean supports updating the user fields by these methods:
  • setUserData ( String name, Timestamp val )
  • setUserData ( String name, short val )
  • setUserData ( String name, byte val )
  • setUserData ( String name, char val )
  • setUserData ( String name, Object val )

The setUserData Java™ method is overloaded to accept the various data types for the user field value. The value supplied for a user field must use the data type that conforms to its database definition. For example, to update a field with the database data type SMALLINT, use the method that accepts a short.

Use the method that accepts an Object as the value to update user field with data types not supported by the methods listed. For example, to update a field with the database data type BIGINT, call setUserData with the Java primitive type of long. The long primitive value is converted to an Object.

For payment table updates, the Transaction Server generates an SQL statement based on the collection and attempts to update the transaction as specified. For item table updates, the Transaction Server reads the latest version item for the specified transaction, applies the item field updates, increments the item version number, and adds the new item to the specified transaction. If the amount changed, the Transaction Server adjusts the batch (ICL) amount total of this transaction to reflect the new amount. If the transaction has a segment, the Transaction Server adjusts that segment amount total.