Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Why doesn’t this get___ call work? 
 
gabrielk
Sr. Member
 
Avatar
Total Posts:  83
Joined:  2007-11-30
 

Just curous about this one: we weren’t getting the auth code and avs status back from PayFlow, to I made some edits to /app/code/core/Mage/Paygate/Model/Payflow/Pro.php to pull in that data.  This is probably just my newness to MVC coding, but here goes.  The existing code is:

$payment->setCcTransId($result->getPnref());

I added:

$payment->setCcApproval($result->getAuthcode());
        
$payment->setCcAvsStatus($result->getAvszip());
        
$payment->setCcAvsStreetStatus($result->getAvsaddr());
        
$payment->setCcCidStatus($result->getCvv2match());

But it didn’t work.  After some var dumping, I changed it to directly call the result array like this:

$payment->setCcApproval($result->_data['authcode']);
        
$payment->setCcAvsStatus($result->_data['avszip']);
        
$payment->setCcAvsStreetStatus($result->_data['avsaddr']);
        
$payment->setCcCidStatus($result->_data['cvv2match']);

...and it worked.  I didn’t see a function anywhere for getPnref(), it seems like it’s just getFieldname and something somewhere automagically figures out what you’re asking for.  Maybe I’m totally wrong there and there’s another association hiding somewhere.  So what am I missing that made my new getFoo() calls not actually get the data?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top