Finance::AMEX::Transaction::EPPRC::Detail::RecordSummary - Parse AMEX Transaction/Invoice Level Reconciliation (EPPRC) Record of Charge (ROC) Detail Rows
version 0.005
use Finance::AMEX::Transaction; my $epraw = Finance::AMEX::Transaction->new(file_type => 'EPPRC'); open my $fh, '<', '/path to EPPRC file' or die "cannot open EPPRC file: $!"; while (my $record = $epraw->getline($fh)) { if ($record->type eq 'ROC_DETAIL') { print $record->AMEX_PROCESS_DATE . "\n"; } } # to parse a single line my $record = $epraw->parse_line('line from an EPPRC file'); if ($record->type eq 'ROC_DETAIL') { ... }
You would not normally be calling this module directly, it is one of the possible return objects from a call to Finance::AMEX::Transaction's getline method.
Returns a new Finance::AMEX::Transaction::EPPRC::Detail::RecordSummary object.
my $record = Finance::AMEX::Transaction::EPPRC::Detail::RecordSummary->new(line => $line);
This will always return the string ROC_DETAIL.
print $record->type; # ROC_DETAIL
Returns the full line that is represented by this object.
print $record->line;
Returns an arrayref of hashrefs where the name is the record name and the value is an arrayref of the start position and length of that field.
# print the start position of the TLRR_PAYMENT_YEAR field print $record->field_map->[3]->{TLRR_PAYMENT_YEAR}->[0]; # 31
This field contains the Service Establishment (SE) Number of the merchant that received the payment from American Express.
Note: SE Numbers are assigned by American Express.
This field contains the Service Establishment (SE) Number of the merchant being reconciled, which may not necessarily be the same SE receiving payment (see AMEX_PAYEE_NUMBER).
This is the SE Number under which the transactions were submitted, which usually corresponds to the physical location.
This field contains the merchant-assigned SE Unit Number (usually an internal, store identifier code) that corresponds to a specific store or location.
If no value is assigned, this field is character space filled.
This field contains the Payment Year that corresponds to the entry in the Julian Date subfield of PAYMENT_NUMBER.
This field contains the Payment Number, a reference number used by the American Express Payee to reconcile the daily settlement to the daily payment.
The Julian date of the payment.
An alpha character assigned by the American Express settlement system.
The Number of the payment.
This field contains the constant literal “3”, a Record Type code that indicates that this is a Record of Charge (ROC) Detail Record.
This field contains the Detail Record Type code that corresponds to this record. For Record of Charge (ROC) Detail Records, this entry is always “11”.
This field contains the SE Business Date assigned to this submission by the submitting merchant location.
The format is: YYYYDDD
This field contains the American Express Transaction Processing Date, which is used to determine the payment date.
This field contains the Summary of Charge (SOC) Invoice Number.
This field contains the Summary of Charge (SOC) Amount originally submitted for payment.
Note: For US Dollar (USD) and Canadian Dollar (CAD) transactions, two decimal places are implied.
A debit amount (positive) is indicated by an upper-case alpha code used in place of the last digit in the amount.
The debit codes and their numeric equivalents are listed below:
A credit amount (negative) is also indicated by an upper-case alpha code used in place of the last digit in the amount.
The credit codes and their numeric equivalents are listed below:
The following are examples of how amounts would appear:
Amount Debit Credit $1.11 0000000011A 0000000011J $345.05 0000003450E 0000003450N $22.70 0000000227{ 0000000227}
This field contains the Record of Charge (ROC) Amount for a single transaction included in this settlement file.
See TLRR_SOC_AMOUNT for debit and credit codes.
This field contains the Cardmember (Account) Number that corresponds to this transaction. (Please note that if Card number masking is enabled this field is required to accept alphanumeric characters.)
This field contains the Cardmember Reference Number assigned to this transaction by the Cardmember, at the time the sale was executed. This data is primarily used in the CPC/Corporate Purchasing Card (a.k.a., CPS/Corporate Purchasing Solutions Card) environment. If this field is populated, this value is used by the Card members organization for tracking and accounting purposes.
This field is unused and reserved for future use.
Note: This field previously contained the SE Reference Number assigned to this transaction by the merchant, at the time the sale was executed. However, due to size limitations, this data is now transported in TLRR_SE_REF_POA. Occasionally, truncated values from TLRR_SE_REF_POA may be partially duplicated in this field. However, this residual data should be ignored. For details on the SE reference number, see TLRR_SE_REF_POA.
Note: This field previously contained the ROC Number, or other charge reference number, assigned to this transaction by the merchant, at the time the sale was executed. This data is now transported in TLRR_SE_REF_POA. For details on the SE reference number, see TLRR_SE_REF_POA.
This field contains the Transaction Date, which is the date the transaction took place (from the TRANSACTION_DATE field in the financial settlement file).
This field contains the SE (Invoice) Reference Number assigned to this transaction by the merchant, at the time the sale was executed.
This entry may be a reference to the Record of Charge (ROC), order number, invoice number, or any other merchant-designated combination of letters and numerals that was intended to aid the merchant in the retrieval of supporting documentation, in case of inquiry or other post-transaction correspondence.
This field contains the Non-Compliant Indicator.
Valid values include the following:
Note: Tilde (~) represents a character space.
These fields contain field-level Non-compliant Error Code(s) applicable to this Record of Charge (ROC).
If unused, this field is character space filled.
Note: One or more of these fields may be populated only if this Record of Charge (ROC) is non-compliant as indicated by the value “A” in the preceding NON-COMPLIANT_INDICATOR field. For more information, see NON-COMPLIANT_INDICATOR.
This field contains the Non-Swiped Indicator. This entry indicates if the American Express or American Express Partner’s Cardmember Account Number for this transaction was manually entered; and either the Card was not present, or the Card’s magnetic stripe or chip could not be read by the POS device. Transactions are reviewed utilizing the Point of Sale Data Code (value “C”) or Authorization Code (value “H”) ”) or Non-Swipe ADJ App-In Code (value “Z”).
Membership Rewards Only
This field contains a code that indicates if this transaction was processed for payment via the American Express Membership Rewards Pay with Points program.
Indicates that the ROC was rejected within the American Express payments processing system.
Valid values are:
This field contains the time stamp submitted on the original ROC.
Format: HHMMSS (24-hour clock)
This field contains the approval code obtained on the authorization request.
This field contains the terminal ID at the merchant location which generated the transaction.
This field contains the Merchant Category Code (MCC) submitted n the original ROC.
This field contains the Card member (Account) Number that corresponds to this transaction. (Please note that if Card number masking is enabled this field is required to accept alphanumeric characters.)
Finance::AMEX::Transaction::EPPRC::Detail::RecordSummary - Object methods for AMEX Transaction/Invoice (ROC) Level detail records.
Tom Heady <cpan@punch.net>
This software is copyright (c) 2022 by ZipRecruiter/Tom Heady.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Finance::AMEX::Transaction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::AMEX::Transaction
CPAN shell
perl -MCPAN -e shell install Finance::AMEX::Transaction
For more information on module installation, please visit the detailed CPAN module installation guide.