univapay / univapay-java-sdk

UnivaPay SDK library for Java
1 stars 1 forks source link

about the type of the cvv parameter #370

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello, when I use the method new CreditCard(cardHolder, cardNumber, expMonth, expYear, cvv), the type of the cvv parameter must be Integer. In this case, calling the method will prompt an HTTPStatus: 400 and UnivapayError: {code:VALIDATION_ERROR, status:error, details:[data.cvv:INVALID_FORMAT_STRING]}. However, when using the API request, the type of the cvv parameter is String. Can you please explain why this happens? Thank you.

andrezimmermann commented 1 year ago

Thanks for reaching out, I confirmed that you're correct and the and the CVV parameter sent must be JsString. I will be opening a PR changing the type and making a release soon.

andrezimmermann commented 1 year ago

I've released version 0.2.26 that have the change on the CVV type, plus some things that were on the backlog. Let me know if you still have any problem with it.

Just to remind that if the system handles directly the credit card information, it will also need to be PCI DSS Compliant. To avoid this you can use the Widget or Checkout to create the token, then use the Java SDK to create and process the charge. This way your system have no contact with the Credit Card data.

ghost commented 1 year ago

Thank you very much! 😀