developers-payu-latam / payu-latam-java-payments-sdk

PayU Latam Java SDK for the Payments API
MIT License
11 stars 30 forks source link

Integrating JAVA SDK throws errors without clear docs #63

Closed Ivanrenes closed 2 years ago

Ivanrenes commented 2 years ago

Hi SDK Developers,

9 hours were spent implementing this SDK and it is hell, there is no clear documentation that helps understand errors.

Do you mind this error?

2022-08-16 08:02:05.425 ERROR 22093 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.payu.sdk.exceptions.PayUException: java.lang.IllegalArgumentException: The input XML is not a valid [com.payu.sdk.payments.model.PaymentMethodRequest] class representation. XML Data: [null]] with root cause

Ivanrenes commented 2 years ago

Solution: My IDE is IntelliJ

Add these dependencies in your gradle.build compile group: 'org.eclipse.persistence', name: 'org.eclipse.persistence.moxy',version: '2.7.3' compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' compile 'com.sun.xml.bind:jaxb-core:2.3.0.1' compile 'com.sun.xml.bind:jaxb-impl:2.3.1' compile 'org.javassist:javassist:3.25.0-GA'

https://stackoverflow.com/questions/58009038/eclipse-4-12-java-lang-classnotfoundexception-com-sun-xml-internal-bind-v2-co