CyberSource / cybersource-rest-client-node

NodeJS client library for the CyberSource REST API
Other
41 stars 45 forks source link

Unable to perform Card-Present and EMV Authorizations #40

Open nootish opened 4 years ago

nootish commented 4 years ago

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.

gnongsie commented 4 years ago

Hi, Thank you for bringing this to our attention. I will relay this to the relevant team.