Closed stefanbutura closed 9 months ago
See https://github.com/shusaura85/fancourier-api/blob/main/src/Fancourier/Request/GetCosts.php#L109
The condition will always be true and the exception will always be thrown.
if ($paymentType != self::TYPE_RECIPIENT || $paymentType != self::TYPE_SENDER) { throw new \InvalidArgumentException("Invalid paymentType value"); }
should probably be
if ($paymentType != self::TYPE_RECIPIENT && $paymentType != self::TYPE_SENDER) { throw new \InvalidArgumentException("Invalid paymentType value"); }
Thanks for the report. I fixed the code and will push v2.0.2 in a few minutes
Edit: v2.0.2 is now live
See https://github.com/shusaura85/fancourier-api/blob/main/src/Fancourier/Request/GetCosts.php#L109
The condition will always be true and the exception will always be thrown.
should probably be