Closed gharbi-mohamed closed 8 months ago
Hi,
Thank you for reporting this issue. I will communicate the same to the relevant team and we will get this sorted. Kindly be patient and we will get back to you.
@gharbi-mohamed Hi, there. I am facing a similar issue. May I know how did you fix it ? Did you fork the repo and add your own fix ?
yeah, im having same problems.
@gharbi-mohamed @mohdhafeezjohari I ended up forking the repo and fixing that case for myself. Please check https://github.com/itslit-tech/cybersource-rest-client-php if that helps you.
Length check has been removed from the models starting from version 0.0.14.
When using getTransaction API, i got an issue with AVS result code which is received from cybersource as "2 " and in the setCode method we have a check on code lenght > 1 which is the case for the non trimmed string.
I guess the fix should be like : vendor/cybersource/rest-client-php/lib/Model/PtsV2PaymentsPost201ResponseProcessorInformationAvs.php:199
public function setCode($code) { $code = trim($code); // remove eventual spaces if (!is_null($code) && (strlen($code) > 1)) { throw new \InvalidArgumentException('invalid length for $code when calling PtsV2PaymentsPost201ResponseProcessorInformationAvs., must be smaller than or equal to 1.'); }