CyberSource / CyberSource/cybersource-rest-client-java
Connection reset error when MLE response is enabled in createPayment Call
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 29
- Forks
- 50
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
Description
While verifying Message Level Encryption (MLE) integration using this SDK together with the official sample repo cybersource-rest-samples-java, I encountered a Connection reset exception only when MLE response encryption is enabled.
The same sample works fine when:
MLE is enabled for request only, or
MLE is disabled entirely.
Enabling both request and response MLE consistently results in a socket connection reset during the payment API (pts/v2/payments) call.
Environment
SDK: This repository (latest which is version 0.087 at this moment)
Samples repo: https://github.com/CyberSource/cybersource-rest-samples-java (latest that uses this SDK ver 0.087)
Sample used: samples/MLEFeature/PaymentsWithMLE.java
Java version: Java 8
OS: Linux
Steps to Reproduce
Clone the sample repository:
git clone https://github.com/CyberSource/cybersource-rest-samples-java
Open the sample:
samples/MLEFeature/PaymentsWithMLE.java
Modify the merchant configuration to enable request and response MLE:
Change (around line #84):
merchantProp = ConfigurationWithMLE.getMerchantDetailsWithMLE1();
To:
merchantProp = ConfigurationWithMLE.getMerchantDetailsWithRequestAndResponseMLE1();
Run:
PaymentsWithMLE.java
Expected Behavior
The payment request should complete successfully when MLE response encryption is enabled, just as it does when only request MLE is enabled.
Actual Behavior
The request fails with a Connection reset error:
Invokers.ApiException: java.net.SocketException: Connection reset
at Invokers.ApiClient.execute(ApiClient.java:1117)
at Api.PaymentsApi.createPaymentWithHttpInfo(PaymentsApi.java:348)
at Api.PaymentsApi.createPayment(PaymentsApi.java:331)
at samples.MLEFeature.PaymentsWithMLE.run(PaymentsWithMLE.java:90)
at samples.MLEFeature.PaymentsWithMLE.main(PaymentsWithMLE.java:34)
Caused by: java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:318)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:346)
Additional Notes
The failure happens only when response MLE is enabled.
The same credentials and configuration work correctly when response MLE is disabled.
This appears to occur before a valid HTTP response is received (connection reset at socket level).
Questions / Help Requested
Is response MLE currently supported for the Payments API in this SDK?
Are there additional configuration steps required for enabling response MLE?
Is this a known issue or regression?
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 samples/MLEFeature/PaymentsWithMLE.java and reproduce using request-and-response MLE, then trace the failing call through Api.PaymentsApi.createPayment and Invokers.ApiClient.execute. Check how response MLE is configured and whether the Payments API supports it; done means the payment call completes with response MLE enabled or the supported behavior and required configuration are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100