Skip to content

Instantly share code, notes, and snippets.

@aldenw
Created April 1, 2026 21:04
Show Gist options
  • Select an option

  • Save aldenw/34d73666ba2307035b80de77f8789cda to your computer and use it in GitHub Desktop.

Select an option

Save aldenw/34d73666ba2307035b80de77f8789cda to your computer and use it in GitHub Desktop.
CoreCard Enrichment Test Summary - DLAB-12188

CoreCard Enrichment Test Summary — Case 5925964

Date: 2026-04-01 Branch: feature/DLAB-12188-transaction-enrichment-v2 Environment: QA (chargebacks911-qa-case-api)

1. What We Sent (HTTP Request)

Request field Value
arn 47899972333579521986680
caseType chargeback
scheme Mastercard
tenantAlias gemini
reasonCode 4808
processorIdentifier AAA
processorAccountNumber 9000000640332178
transactionId 1464939326
transaction.transactionDate 2026-03-10
transaction.transactionAmount.amount 199.99
transaction.transactionAmount.currency USD
cardHolder.cardBin 123456
cardHolder.panLastFour 1102

2. What CoreCard Returned (via fromCoreCardTransaction mapping)

The CoreCard getTransactionHistory API was called with accountNumber=9000000640332178 and transactionId=1464939326. Based on the DB values that differ from the request, CoreCard enriched:

EnrichedCardTransaction field CoreCard CoreCardTransaction field Value returned
cardAcceptor.name enrichedMerchantName / merchantName WHOLE FOODS MARKET
transactionAmount transactionAmount 1764.31
transactionDate transactionDateTime 2026-03-10
settlementDate effectiveDate 2026-03-11
mcc merchantCategoryCode 5411 (Grocery Stores)
arn acquirerReferenceNumber null (hasArn: false)
authId approvalCode (empty)
transactionId transactionId 1464939326
validationSource (hardcoded) CUSTOM_API
currency transactionAmountCurrencyCode USD (currency_id=1)
binFirst6 productBin (not overwritten — kept request value)
binLast4 cardNumberLast4Digit (not overwritten — kept request value)

3. Final DB Values

cases (id: 5925964)

Column Value
arn 47899972333579521986680
card_acceptor_id 17725
card_holder_id 5914089
processor_details_id 4058
transaction_id (FK) 5915384

case_transactions (id: 5915384)

Column Value Source
transaction_id 1464939326 Request + CoreCard
date_time 2026-03-10 04:11:29 Request / CoreCard
decimal 1764.31 CoreCard (overrode request 199.99)
currency_id 1 (USD) Request / CoreCard
exponent 2 Derived
processing_date 2026-03-11 CoreCard (effectiveDate)
transaction_type_id 1022 CoreCard

case_transactions_meta (case_transaction_id: 5915384)

Column Value Source
auth_code (empty) CoreCard (approvalCode)
product_code 13637 CoreCard
product_type Purchase CoreCard
is_digital_transaction 0 CoreCard
security_protocol_id 1005 CoreCard

case_card_acceptors (id: 17725)

Column Value Source
name WHOLE FOODS MARKET CoreCard (enriched merchant name)
mcc_code_id 13165411 (Grocery Stores) CoreCard

case_cardholders (id: 5914089)

Column Value Source
bin 123456 Request
pan_last_four 1102 Request
customer_id 97800934006818764 CoreCard
scheme_id 2 (Mastercard) Request

processor_details (id: 4058)

Column Value Source
processor_account_number 9000000640332178 Request
issuer_identifier AAA Request (processorIdentifier)
issuer_doc_indicator 0 Request (docIndicator: false)

Notable Observations

  1. Merchant mismatch — CSV says Best Buy (MCC 5812), CoreCard returned WHOLE FOODS MARKET (MCC 5411). Either the test CoreCard environment has different data, or the transaction ID matched a different record.
  2. Amount mismatch — Request sent 199.99, CoreCard returned 1764.31. CoreCard's value overwrote the request.
  3. ARN not enriched — CoreCard returned null for acquirerReferenceNumber, so the ARN stayed as the request value.
  4. customer_id was enriched from CoreCard — 97800934006818764.

Bugs Fixed During Testing

  1. processorAccountNumber not persisted during case creationProcessorDetailsDto::fromIssuerDispute() only copied the field for InitiateIssuerDisputeRequest, not CreateIssuerDisputeRequest. Enrichment runs after initial creation, so the value was always null. Fixed by moving the assignment out of the $isInitiate guard. (commit 4e811cbe46)
  2. transactionId in wrong location in request body — Was nested inside transaction.transactionId but the DTO expects it at the top level (transactionId). Fixed in test HTTP file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment