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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!