V3.0.4: How To Store & Show Custom Payment Method Data

Hello,



I have a working custom payment method installed with V3.0.4 Professional, but I still seem to have some kind of minor issue with storing / showing some custom data.



See the code below. This is how I add the custom data to the database in the custom payment method file.


db_query("UPDATE ?:orders SET svm_method = '$svm_method' WHERE order_id = '$order_id'");
```<br />
<br />
The code is working like a charm to this point when I have initially received a successful order. I am able to show this custom data in the admin panel in the order details page. However, the problem arises when I need to edit&save the order in the admin panel - somehow that custom data is no longer available after editing and saving the order.<br />
<br />
I am just wondering if this is a problem with wrong type of SQL UPDATE code or is there another template (related to edit&save functionality) that I need to worry about?<br />
<br />
I hope I was clear enough. Thanks in advance!

Why don't you store your value in the pp_response array and let the system handle it for you? It will then display in the payment area of the order and it will encrypt/decrypt with the other stored payment data.

[quote name=‘tbirnseth’ timestamp=‘1438497655’ post=‘225291’]

Why don’t you store your value in the pp_response array and let the system handle it for you? It will then display in the payment area of the order and it will encrypt/decrypt with the other stored payment data.

[/quote]



Thanks for the awesome tip! Not sure why I haven’t done so. I will give it a try… :)