dotpay / PHP-SDK

Set of class to help everyone with creating own integration with Dotpay
MIT License
4 stars 6 forks source link

Invalid parameters case for chk generation #3

Open kkalkhoff opened 5 years ago

kkalkhoff commented 5 years ago

Hey,

there is a bug in file Channel.php in public static function getCHK($inputParameters, $pin, array $subPayments = []) method which results in invalid chk value generated for request:

// Line 510 - 'URL' should be lowercase
(isset($inputParameters['URL']) ? $inputParameters['URL'] : null).
// Line 513 - 'URLC' should be lowercase
(isset($inputParameters['URLC']) ? $inputParameters['URLC'] : null).

where in official technical documentation those parameters are lowercase everywhere - https://www.dotpay.pl/developer/doc/api_payment/pl/index.html#ochrona-integralnosci-parametrow-przekierowania-chk

Or maybe it should be other way around and documentation should specify them as uppercase? Either way it creates a divergence between those two.