Monday 15 June 2015

update columns in magento order payment table -


I'm still meeting with the Magneso model.

We have Magento plugin which offers another checkout option. Removes one of our customer orders and sends the file to the processing center for processing.

This script only removes the order that was processed using CyberSource; Since we do not have permission to update this script, I need to set up these two columns, so for this order processed by our checkout plugin, this column will be called 'cybersource_token' and 'method' by sales_flat_order_payment Removal is written to the file when this script is run. After the magenone order is created, I will do this in our plugin.

I tried the following

  $ OrderPayment = Mage :: getModel ('sales / order_payment', $ order) - & gt; GetPayment (); $ Order payment - & gt; Setdata ('cybersource_token', '1234'); $ Order payment- & gt; Set data ('method', 'cyberosource_soup');   

But it can not be found to work.

Any suggestions about updating these two columns?

How to do this? Try an option First of all, do not believe at all. I know a result

  $ order payment = route: getModel ('sales / order_payment'); $ Order payment - & gt; Setdata ('cybersource_token', '1234'); $ Order payment- & gt; Set data ('method', 'cybersource_sap');   

or $ order = mage :: getModel ('Sales / Order'); // This line sample is: Make a change in your order $ order payment = mys :: millmodel ('sales / order_payment'); SetCybersource_token ('1234') - & gt; SetMethod ('cybersource_soap'); $ Order- & gt; SetPayment ($ orderPayment);

No comments:

Post a Comment