Skip to content

Rename claim key for API response MLE handling#194

Open
kiranirabatti wants to merge 1 commit intoCyberSource:masterfrom
kiranirabatti:patch-1
Open

Rename claim key for API response MLE handling#194
kiranirabatti wants to merge 1 commit intoCyberSource:masterfrom
kiranirabatti:patch-1

Conversation

@kiranirabatti
Copy link
Copy Markdown

The JWT token generated for Response MLE includes the claim name "v-c-response-mle-kid" but the CyberSource server expects "v-c-api-response-mle-kid". This mismatch causes the server to reset the connection (ECONNRESET) on POST requests when Response MLE is enabled.

File: src/authentication/jwt/JWTSigToken.js (line 80)
Change: "v-c-response-mle-kid" → "v-c-api-response-mle-kid"

Without this fix, any merchant enabling Response MLE with the Node SDK v0.0.76 will get ECONNRESET on all POST/PUT/PATCH requests (payments, refunds, etc). GET requests are unaffected as they don't include this claim.

Tested and confirmed working with:

PaymentsApi.createPayment (POST /pts/v2/payments)
MicroformIntegrationApi.generateCaptureContext (POST /microform/v2/sessions)
CustomerPaymentInstrumentApi.getCustomerPaymentInstrumentsList (GET)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant