• Welcome to KonaKart Community Forum. Please login or sign up.
 

Not saving a custom value of the paymentdetails

Started by vpod, December 15, 2009, 08:31:28 pm

Previous topic - Next topic

vpod

After several hours of work I did create a new Payment method called "monthly instalments". A customer using this method must select a number of instalments. I store this value in the costum Value 1 of the paymentDetails object.

While I have the order in memory I can get the number of instalments. But after saving the order and trying to load it, I can not get the saved value.

This is how I set the value:

QuotePaymentDetails[] payMethods = eng.getPaymentGateways(order,-1);

PaymentDetails mPay = payMethods[0];
mPay.setCustom1(instalments);

order.setPaymentDetails(mPay);

orderId = eng.saveOrder(sessionId, order, -1);


This is how I tried to get the value back:

QuoteOrder order = eng.getOrder(sessionId,orderId,-1);
PaymentDetails pd = eng.getPaymentGateway(order,order.getPaymentModuleCode(),-1);
String instalments = pd.getCustom1();


But getCustom1() is null. Is It posible that this value is never stored in the database?

Vpod

trevor

QuoteBut getCustom1() is null. Is It posible that this value is never stored in the database?


Yes. You should use a custom field of the order.