You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the API Documentation, chapter 6.A.4, example 3 "NL Insured", the insured amount should be injected in cents, and be either 5000, 25000, 50000 or 500000.
But when I view the code in the SDK, Model\MyParcelConsignment::setInsurance() accepts the Insured amount in whole euros, and the function also accepts values between 1000 and 4500 euros, in steps of 500.
These values are not enforced when setInsurance gets called; therefore I'd still be able to inject invalid values like "1Aje83", which would eventually lead to an insurance for just € 1,-
Would it be an option to enhance setInsurance to also check for a valid Insurance value, and add a note in the SDK-documentation that the Insurance value should be provided in whole euros?
Perhaps the API documentation should be updated as well, if the 1000-4500 range should be supported...
The text was updated successfully, but these errors were encountered:
Hi Reindert,
According to the API Documentation, chapter 6.A.4, example 3 "NL Insured", the insured amount should be injected in cents, and be either 5000, 25000, 50000 or 500000.
But when I view the code in the SDK, Model\MyParcelConsignment::setInsurance() accepts the Insured amount in whole euros, and the function also accepts values between 1000 and 4500 euros, in steps of 500.
These values are not enforced when setInsurance gets called; therefore I'd still be able to inject invalid values like "1Aje83", which would eventually lead to an insurance for just € 1,-
Would it be an option to enhance setInsurance to also check for a valid Insurance value, and add a note in the SDK-documentation that the Insurance value should be provided in whole euros?
Perhaps the API documentation should be updated as well, if the 1000-4500 range should be supported...
The text was updated successfully, but these errors were encountered: