CyberSource / CyberSource/cybersource-rest-client-ruby
MLE Decryption Failing
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 7
- Forks
- 53
- Avg merge
- 30m
- Merged PRs (30d)
- 1
Description
I'll first start by saying I am not sure if this on the CyberSource Test API side or this gem. I reached out to their support but it's getting no where. We recently ran into an issue where MLE decryption stopped working when no changes or deployments were made on our side. We are on version 0.0.82 of this gem. We are hitting apitest.cybersource.com and attempting to call.
payment_instance = CyberSource::PaymentsApi.new(api_client, config)
response, status_code = payment_instance.create_payment(request_obj)
The error returned is CyberSource::ApiError Exception: Failure when receiving data from the peer. It works fine when enableResponseMleGlobally is set to false. We already tried swapping out our certs to no avail.
Any help would be appreciated! Below is our log output as well:
[2026-03-11 11:11:57] INFO (MerchantConfig): START> =======================================
[2026-03-11 11:11:57] INFO (MerchantConfig): Entered value for Key File Path : /path/to/resource/StagingCybersourceRequestMLE.p12
[2026-03-11 11:11:57] INFO (MerchantConfig): Merchant Configuration:
{
"runEnvironment" => "apitest.cybersource.com",
"timeout" => 10000,
"authenticationType" => "JWT",
"jsonFilePath" => "/path/to/resource/request.json",
"keysDirectory" => "/path/to/resource",
"keyFilename" => "StagingCybersourceRequestMLE",
"logConfiguration" => {
"enableLog" => true,
"loggingLevel" => "DEBUG",
"logDirectory" => "log",
"logFilename" => "cybs",
"maxLogSize" => 10485760,
"maxLogFiles" => 5,
"enableMasking" => true
},
"enableRequestMLEForOptionalApisGlobally" => true,
"requestMleKeyAlias" => "CyberSource_SJC_US",
"enableResponseMleGlobally" => true,
"responseMlePrivateKeyFilePath" => "/path/to/resource/StagingCybersourceResponseMLE.p12",
"responseMlePrivateKeyFilePassword" => "[REDACTED]",
"responseMleKID" => "[REDACTED]"
}
[2026-03-11 11:12:04] INFO (MLEUtility): Encrypting request payload
[2026-03-11 11:12:04] DEBUG (MLEUtility): LOG_REQUEST_BEFORE_MLE:
{
"clientReferenceInformation": {
"code": "[REDACTED]",
"partner": { "developerId": "[REDACTED]" }
},
"processingInformation": {
"capture": true,
"commerceIndicator": "internet"
},
"paymentInformation": {
"customer": { "id": "[REDACTED]" }
},
"orderInformation": {
"amountDetails": {
"totalAmount": "5.17",
"currency": "USD"
}
}
}
[2026-03-11 11:12:04] DEBUG (MLEUtility): LOG_REQUEST_AFTER_MLE: { "encryptedRequest": "[ENCRYPTED_PAYLOAD]" }
[2026-03-11 11:12:04] INFO (Authorization): Authentication Type: JWT
[2026-03-11 11:12:04] DEBUG (MLEUtility): Validating responseMleKID for JWT token generation
[2026-03-11 11:12:04] DEBUG (MLEUtility): P12/PFX file detected, checking if it is a CyberSource certificate
[2026-03-11 11:12:04] DEBUG (MLEUtility): Successfully auto-extracted responseMleKID from CyberSource P12 certificate
[2026-03-11 11:16:05] INFO (MLEUtility): Encrypting request payload
[2026-03-11 11:16:05] DEBUG (MLEUtility): LOG_REQUEST_BEFORE_MLE:
{
"clientReferenceInformation": {
"code": "[REDACTED]",
"partner": { "developerId": "[REDACTED]" }
},
"processingInformation": {
"capture": true,
"commerceIndicator": "internet"
},
"paymentInformation": {
"customer": { "id": "[REDACTED]" }
},
"orderInformation": {
"amountDetails": {
"totalAmount": "5.17",
"currency": "USD"
}
}
}
[2026-03-11 11:16:05] DEBUG (MLEUtility): LOG_REQUEST_AFTER_MLE: { "encryptedRequest": "[ENCRYPTED_PAYLOAD]" }
[2026-03-11 11:16:05] INFO (Authorization): Authentication Type: JWT
[2026-03-11 11:16:05] DEBUG (MLEUtility): Validating responseMleKID for JWT token generation
[2026-03-11 11:16:05] DEBUG (MLEUtility): P12/PFX file detected, checking if it is a CyberSource certificate
[2026-03-11 11:16:05] DEBUG (MLEUtility): Successfully auto-extracted responseMleKID from CyberSource P12 certificate
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CyberSource::PaymentsApi#create_payment and the configuration for enableResponseMleGlobally, responseMlePrivateKeyFilePath, and responseMleKID. Reproduce the failure against apitest.cybersource.com with response MLE enabled, then compare it with the working disabled case. Done means identifying whether the client or CyberSource test API causes the peer failure and documenting or testing the confirmed fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100