AS2805 Message Holder Base

AS2805 Message Holder base class

All dynamic logic helper functions for AS2805 messages, originate from AS2805MessageHolder. This base grants access, from within dynamic logic, to all the individual fields that are available on a AS2805 message. Which actual fields (i.e. data elements) are available depends on the use case at hand and also on the respective type of interface message (A or B) you are dealing with. The following sub-class pairs for AS2805MessageHolder exist:

  • AS2805_AClaimRequest and AS2805_AClaimResponse

  • AS2805_BClaimRequest and AS2805_BClaimResponse

  • ReconciliationRequest and ReconciliationResponse

General purpose properties and methods

The following general purpose properties and methods are available in dynamic logic, once you have obtained one of the aforementioned realizations of AS2805MessageHolder. An instance can be obtained through a constructor call, like:

   // Here 'trigger' is the binding name for the exchange's RAW input
   as2805MessageIn = AS2805_AClaimRequest(trigger)
Name Category Purpose Return Type Parameters

setBitValue (1)

method

Sets a certain data element value

self (2)

int: index of the data element
String: value for the data element

getBitValue

method

Gets the value of a specific data element

String

int: index of the data element

propertyKey

property

Specifies the message type

String

cancellationType

property

Returns whether the message is a target for Claim Cancel

boolean

mti

property

Returns the AS2805 message type indicator

String

bitMap

property

Returns the AS2805 bitmap

String

memberNumber

property

Sets member number identification

self (2)

String

providerType

property

Returns the provider type (enum) that is encoded in card acceptor ID code

providerType(3)

serviceProvider

property

Returns the service provider that is encoded in card acceptor ID code

String(3)

(1) note that the value send to this method will be appropriately processed for things like: required padding, and data transformation as is specified by the AS2805 standard.
(2) self, allows method chaining if so desired.
(3) for the single character representation of the ProviderType, use providerType.code. These synthesized fields are only applicable for AS2805_B exchanges.

Provider Type

The provider type can be expressed as the last character in the card acceptor ID code. The providerType property can be used to get to that information. It either returns the specific enum value or null, when the character in the card acceptor ID code cannot be matched to any of the known provider types, see below table.

Character Enum Value

B

Acupuncturist

C

Chiropractic

D

Dental

E

Dietician

F

Podiatrist

G

Medical

H

OccupationalTherapist

I

Osteopath

J

Myopathy

M

MassageTherapist

N

Naturopath

O

Optometry

P

Physiotherapy

Q

ComplimentaryTherapies

S

SpeechPathologist

U

ExercisePhysiology

V

Audiologiy

Y

Psychologist

AS2805 Field Table and properties that assist writing readable code

From within OIG Gateway dynamic logic there is assistance offered that allows you to write readable (transformation) code for AS2805 messages. In the context of the Australian localization this means that access to the fields contained by an AS2805 message is provided. You can always fall-back to the above general purpose properties and methods to read and write individual elements. However, the base (AS2805MessageHolder) also offers property accessors (get and set) using more human friendly names as the below table shows.

Using accessors

The following dynamic logic snippets shows how you can use the accessors.

   // Obtain a concrete realization of a AS2805MessageHolder
   // In this case the exchange's 'trigger' payload is used as the source
   claim = AS2805_BClaimRequest(trigger)

   // read a value - 'get' accessor
   log.info('The value of the primary account number is: {0}', claim.primaryAccountNumber)

   // write a value - 'set' accessor
   claim.primaryAccountNumber = '1234567890'

AS2805 Fields and accessors

Field Index Description Accessor

2

Primary Account Number (PAN)

primaryAccountNumber

3

Processing code

processingCode

4

Amount transaction

amountTransaction

5

Amount settlement

amountSettlement

6

Amount cardholder billing

amountCardHolderBilling

7

Transmission date and time

transmissionDateTime

8

Amount cardholder billing fee

amountCardHolderBillingFee

9

Conversion rate, settlement

conversionRateSettlement

10

Conversion rate, cardholder billing

conversionRateCardHolderBilling

11

System Audit Trace Number (STAN)

systemTraceAuditNumber

12

Local transaction time

timeLocalTransaction

13

Local transaction date

dateLocalTransaction

14

Expiration date

dateExpiration

15

Settlement date

dateSettlement

16

Conversion date

dateConversion

17

Capture date

dateCapture

18

Merchant type

merchantType

19

Acquiring institution country code

acquiringInstitutionCountryCode

20

PAN extended country code

panExtendedCountryCode

21

Forwarding institution country code

forwardingInstitutionCountryCode

22

POS entry mode

POSEntryMode

23

Card sequence number

cardSequenceNumber

24

International identifier

internationalIdentifier

25

POS condition code

POSConditionCode

26

POS PIN capture code

POSPinCaptureCode

27

Authorization ID response length

authorizationIDResponseLength

28

Amount transaction fee

amountTransactionFee

29

Amount settlement fee

amountSettlementFee

30

Amount processing fee

amountProcessingFee

31

Amount settlement processing fee

amountSettelementProcessingFee

32

Acquiring institution ID code

acquiringInstitutionIDCode

33

Forwarding institution ID code

forwardingInstitutionIDCode

34

PAN extended

PANExtended

35

Track 2 data

track2Data

36

Track 3 data

track3Data

37

Retrieval Reference Number (RRN)

retrievalReferenceNumber

38

Authorization ID response

authorizationIDResponse

39

Response code

responseCode

40

Service restriction code

serviceRestrictionCode

41

Card acceptor terminal ID

cardAcceptorTerminalID

42

Card acceptor ID code

cardAcceptorIDCode

43

Card acceptor name location

cardAcceptorNameLocation

44

Additional response data

additionalResponseData

45

Track 1 data

track1Data

46

Additional data ISO

additionalDataISO

47

Additional data National

additionalDataNational

48

Additional data private

additionalDataPrivate

49

Currency code transaction

currencyCodeTransaction

50

Currency code settlement

currencyCodeSettlement

51

Currency code billing

currencyCodeBilling

52

PIN data

PINdata

53

Security related control information

securityRelatedControlInformation

54

Additional amounts

additionalAmounts

55

ICC data

ICCData

56

Amount cash

amountCash

57

Ledger balance

ledgerBalance

58

Account balance

accountBalance

61

Reserved private

reservedPrivate

64

Message authentication code

messageAuthenticationCode

66

Settlement code

settlementCode

67

Extended payment code

extendedPaymentCode

68

Receiving institution country code

receivingInstitutionCountryCode

69

Settlement institution country code

settlementInstitutionCountryCode

70

Network Management Information code (NMI)

networkManagementInformationCode

71

Message number

messageNumber

72

Message number last

messageNumberLast

73

Date action

dateAction

74

Number credits

creditsNumber

75

Reversal number credits

creditsReversalNumber

76

Number debits

debitsNumber

77

Reversal number debits

debitsReversalNumber

78

Number transfer

transferNumber

79

Reversal number transfer

transferReversalNumber

80

Number inquiries

inquiriesNumber

81

Number authorizations

authorizationNumber

82

Credits, Processing fee amount

creditsProcessingFeeAmount

83

Credits, Transaction fee amount

creditsTransactionFeeAmount

84

Debits, Processing fee amount

debitsProcessingFeeAmount

85

Debits, Transaction fee amount

debitsTransactionFeeAmount

86

Amount credits

creditsAmount

87

Reversal amount credits

creditsReversalAmount

88

Amount debits

debitsAmount

89

Reversal amount debits

debitsReversalAmount

90

Original data elements

originalDataElements

91

File update code

fileUpdateCode

92

File security code

fileSecurityCode

93

Response indicator

responseIndicator

94

Service indicator

serviceIndicator

95

Amounts replacements

replacementAmounts

96

Message security code

messageSecurityCode

97

Amount net settlement

amountNetSettlement

98

Payee

payee

99

Settlement institution ID code

settlementInstitutionIDCode

100

Receiving institution ID code

receivingInstitutionIDCode

101

File name

fileName

102

Account identification 1

accountIdentification1

103

Account identification 2

accountIdentification2

104

Transaction description

transactionDescription

112

Key Management Data (KMD)

keyManagementData

117

Card status update code

cardStatusUpdateCode

118

Cash total number

cashTotalNumber

119

Cash total amount

cashTotalAmount

128

MAC extended

MACExtended

Obtaining a concrete realization of a message holder

Generic

Use case Factory method Input Notes

0520, 0521 (Request)

ReconciliationRequest(input)

This is typically, the 'trigger' input for the exchange

Wraps the AS2805 request and provides some additional helper methods.

0530 (Response)

ReconciliationResponse(input)

This is typically the 'trigger' input for the exchange

Creates the AS2805 response by copying/echoing the relevant input data.

Both of these result in a specific AS2805 message instance, which can subsequently be further augmented through the provided helper methods. For details check elsewhere in this guide.

AS2805_A

Use case Factory method Input Notes

0200 170000 (Request)

AS2805_AClaimRequest(input)

This is typically, the 'trigger' input for the exchange

Wraps the AS2805 request and provides some additional helper methods.

0210-170000 (Response)

AS2805_AClaimRequest#createResponse()

No input required. Effectively you are calling a factory method on an instance of AS2805_AClaimRequest.

Creates the AS2805 response by copying/echoing the relevant input data.

Both of these result in a specific AS2805 message instance, which can subsequently be further augmented through the provided helper methods. For details check elsewhere in this guide.

AS2805_B

Use case Factory method Input Notes

0200-170000, 0200-171000 (Request)

AS2805_BClaimRequest(input)

This is typically, the 'trigger' input for the exchange

Wraps the AS2805 request and provides some additional helper methods.

0210-170000, 0210-171000 (Response)

AS2805_BClaimRequest#createResponse()

No input required. Effectively you are calling a factory method on an instance of AS2805_AClaimRequest.

Creates the AS2805 response by copying/echoing the relevant input data.

Both of these result in a specific AS2805 message instance, which can subsequently be further augmented through the provided helper methods. For details check elsewhere in this guide.

Fields that use leading zeros

Get accessors for AS2805 fields that are prefixed by leading zeros, including the amount charged field as part of line items contained by additional data private field, will strip these leading zeros. This somewhat simplifies handling these fields from dynamic logic.