Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.6.8

Bug #1271 Result::validate() not accessing options correctly
Submitted: 2004-04-23 16:47 UTC
From: aashley at optimiser dot com Assigned: ieure
Status: Closed Package: Payment_Process
PHP Version: Irrelevant OS: All
Roadmaps: (Not assigned)    
Subscription  


 [2004-04-23 16:47 UTC] aashley at optimiser dot com
Description: ------------ when Result::validate() is called it tries to access $this->_request->options[] which doesnt exist. This is incorrect for two reasons, first the array is _options not options and more importantly its a private array and it should be using the getOption function. The below patch makes this change. Really should do something about the access from the Result object to the Payment object attached to the Request as well. --- /usr/share/pear/Payment/Process.php 2004-04-13 13:13:15.000000000 +0800 +++ Process.php 2004-04-24 00:54:58.593967038 +0800 @@ -582,13 +582,13 @@ function validate() { - if ($this->_request->options['avsCheck'] === true) { + if ($this->_request->getOption('avsCheck') === true) { if ($this->getAVSCode() != PAYMENT_PROCESS_AVS_MATCH) { return PEAR::raiseError('AVS check failed',PAYMENT_PROCESS_ERROR_AVS); } } - if ($this->_request->options['cvvCheck'] === true && + if ($this->_request->getOption('cvvCheck') === true && $this->_request->_payment->_driver == PAYMENT_PROCESS_TYPE_CREDITCARD) { if ($this->getCvvCode() != PAYMENT_PROCESS_CVV_MATCH) { return PEAR::raiseError('CVV check failed',PAYMENT_PROCESS_ERROR_CVV);

Comments

 [2004-04-28 20:17 UTC] ieure
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.