Yes that is what I am doing. I am not using a cart, rather I am calling a series of simple methods. First I prep the data and call storeOrder to create the order in OFBiz. The service also creates an OrderPaymentPreference record of type EXT_OFFLINE (I am passing this in a map to storeOrder.) Then I call changeOrderStatus to change the order from created to approved. Then I call createPaymentFromPreference which successfully creates a payment record. The last service I call is processOrderPayments. I still need to figure out how to generate the invoice and appy payments.
There is probably an easier way to do this. Right now I have to call all of these services with require-new-transaction="true" so that records are committed to the database before the next service is called. Vince Clark [email protected] (303) 493-6723 ----- Original Message ----- From: "Jacopo Cappellato" <[email protected]> To: [email protected] Sent: Wednesday, July 22, 2009 2:20:47 AM GMT -07:00 US/Canada Mountain Subject: Re: importing orders from another system Hi Vince, if you create the payment for the order before the invoice, when the invoice is created the payment should be applied to it. Jacopo On Jul 21, 2009, at 6:54 PM, Vince Clark wrote: > I am building an import that connects to another system and imports > orders on a daily basis. Payment processing and shipping is handled > in the other system so I just need to create the order, a payment, > and then ship the order to update inventory and accounting in OFBiz. > > I am not sure the best way to handle the payment. I was thinking of > creating an OrderPaymentPreference with paymentMethodTypeId = > EXT_OFFLINE. There is a service (createPaymentFromPreference) that > will then create the payment, although it doesn't seem to complete > the proess of actually receiving the payment against the order. > > Am I going down the wrong path here? > > > Vince Clark > [email protected] > (303) 493-6723
