CyberSource / CyberSource/cybersource-rest-client-node

Unable to perform Card-Present and EMV Authorizations

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
49
Forks
50
Avg merge
18m
Merged PRs (30d)
2

Description

Following the examples at here and here, I am unable get a successful response in the sandbox environment.

Card Present + EMV (Contact)

Request payload
{
  clientReferenceInformation: { code: 'TC50171_3' },
  processingInformation: { commerceIndicator: 'retail' },
  orderInformation: { amountDetails: { totalAmount: '1', currency: 'SGD' } },
  pointOfSaleInformation: {
    cardPresent: 'Y',
    entryMode: 'contact',
    catLevel: 6,
    terminalCapability: 4,
    trackData: '%B4111111111111111^SMITH/BETTY^23121200123456789012**XXX******?*',
    emv: {
      tags: '9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000',
      cardSequenceNumber: '001',
      fallback: 'true'
    }
  }
}
Response Body
{
  submitTimeUtc: '2020-04-23T11:19:21Z',
  status: 'INVALID_REQUEST',
  reason: 'INVALID_DATA',
  message: 'Declined - One or more fields in the request contains invalid data'
}

Card Present + EMV (Contactless)

Request payload
{
  clientReferenceInformation: { code: 'TC50171_3' },
  processingInformation: { commerceIndicator: 'retail' },
  orderInformation: { amountDetails: { totalAmount: '1', currency: 'SGD' } },
  pointOfSaleInformation: {
    cardPresent: 'Y',
    entryMode: 'contactless',
    catLevel: 6,
    terminalCapability: 5,
    trackData: '%B4111111111111111^SMITH/BETTY^23121200123456789012**XXX******?*',
    emv: {
      tags: '9F3303204000950500000000009F3704518823719F100706011103A000009F26081E1756ED0E2134E29F36020015820200009C01009F1A0208409A030006219F02060000000020005F2A0208409F0306000000000000',
      cardSequenceNumber: '001',
      fallback: 'true'
    }
  }
}
Response Body
{
  submitTimeUtc: '2020-04-23T11:22:38Z',
  status: 'INVALID_REQUEST',
  reason: 'INVALID_DATA',
  message: 'Declined - One or more fields in the request contains invalid data'
}

I have a feeling that the EMV values are incorrect, but am unsure what is wrong as the response is pretty vague. Would appreciate if someone could correct my mistake.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CyberSource Card-Present and EMV authorization examples and API reference, then compare their required EMV and point-of-sale fields with the provided sandbox payloads. Reproduce both contact and contactless requests and determine which value causes INVALID_DATA; done means documenting a corrected request that receives a successful authorization response.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.