English 中文(简体)
我如何填写Magento Admin交易屏幕内的“交易细节”关键/价值表?
原标题:How do I fill the "Transaction Details" key/value table inside the Transaction screen of Magento Admin?

I ve建立了一个海关付款网,但现在我需要处理邮政付款通知(如尼共(毛主义)),以便为某项交易提供补充资料。

I ve tried a lot of different combinations including:

Mage::getModel( sales/order )->load( #id )
    ->getPayment()
        ->getTransaction( #id )
            ->setAdditionalInformation( foo ,  bar )
                ->save();

Which doesn t produce any error (I m able to retrieve order/payment/transaction) But save action seems to be inoperant. I also tried to save through the payment object without luck.

最佳回答

本人创建:P

$payment->getTransaction($id)
    ->setAdditionalInformation(
        Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS,
        $data
    )->save();
问题回答

如果你试图列入关于“授权”薪元级的信息,那么,这里就是一个有用的幻灯(请将变量改为你自己的数据!):

public function authorize(Varien_Object $payment, $amount) {
    .....
   $_data = array(  Tranx  => $_transax,  Auth  => $_autho ...);
   $payment->setTransactionAdditionalInfo(
                Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS,
                $_data);
   $payment->setTransactionId($_authid)->setIsTransactionClosed(0);
   return $this
   }
$transactin_detail = Mage::getModel( sales/order )->loadByIncrementId($order_id)->getPayment()->getTransaction($transId)->save();

echo  <pre> ;
print_r($transactin_detail);

 





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签