Connection reset error when MLE response is enabled in createPayment Call

Offen
#240 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
java
Bereich
api, payments

Rechercherichtung

Beginne mit samples/MLEFeature/PaymentsWithMLE.java und reproduziere das mit request-and-response MLE. Verfolge anschließend den fehlschlagenden Aufruf durch Api.PaymentsApi.createPayment und Invokers.ApiClient.execute. Prüfe, wie response MLE konfiguriert ist und ob die Payments API dies unterstützt; abgeschlossen ist die Aufgabe, wenn der Zahlungsaufruf mit aktiviertem response MLE abgeschlossen wird oder das unterstützte Verhalten und die erforderliche Konfiguration eindeutig dokumentiert sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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?

Vorherrschende Sprache
Java
Sterne
29
Forks
50
Ø Merge
1 Std. 30 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CyberSource/cybersource-rest-client-java

Alle Issues in CyberSource/cybersource-rest-client-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.