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

magento payment module I can’t get value from custom field
 
isuru
Jr. Member
 
Total Posts:  4
Joined:  2010-02-25
 

Hi,

I’m writing a magento module for invoice payment system. It require a user to enter his personal number and the mobile number after selecting my payment module. upto getting user entered values to assignData function is work fine. but i have to pass personal number and the telephone number to authorize function to process the payment. but it not work. please help me to find out the problem

here is my Fortus\Invoice\Model\Payment.php file

<?php

class Fortus_Invoice_Model_Payment extends Mage_Payment_Model_Method_Abstract
{
    
protected $_isGateway true;
    protected 
$_canAuthorize true;
    protected 
$_canUseCheckout true;
    
    protected 
$_code "invoice";
    protected 
$_formBlockType 'invoice/payment_form_invoice';
    public 
$personal_number;
    
    public function 
assignData($data{
        $details 
= array();
        if(!(
$data instanceof Varien_Object)) {
            $data 
= new Varien_Object($data);
        
}
        $info 
$this->getInfoInstance();
        
$info->setPoNumber($data->getPersonalNumber());
        
        return 
$this;
    
}
    
    
public function getApi() {
        $api 
Mage::getSingleton('invoice/api_fortusfinancewebclientservice');
        
$api->FortusFinanceWebClientService("001","test");
        return 
$api;
    
}
    
    
    
public function authorize(Varien_Object $payment$amount)
    
{
        $orderId 
$payment->getOrder()->getIncrementId();
        
        
$info $this->getInfoInstance();
        
$pno_number $info->getPoNumber(); //getting null value :(

        
$api $this->getApi();
        
            
        
$orderId $api->PlaceOrder($payment,$pno_number);
        
        return 
$this;
    
}
}


?>
 
Magento Community Magento Community
Magento Community
Magento Community
 
isuru
Jr. Member
 
Total Posts:  4
Joined:  2010-02-25
 

if anyone has anwer to this please replay.

Thanks,
Isuru

 
Magento Community Magento Community
Magento Community
Magento Community
 
Wesley Willians
Jr. Member
 
Total Posts:  10
Joined:  2010-07-13
 

Hi Man,

Did you get the solution. I have the same problem here.

Thanks

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