After payment processed getting at the products ordered

Posted by Community Admin on 05-Aug-2018 21:15

After payment processed getting at the products ordered

All Replies

Posted by Community Admin on 14-Sep-2015 00:00

Currently I have implemented a custom IPaymentProcessorProvider and I need to pass the orders line items to our ERP system so I can have the order filled through that. I currently can get at all the customer/billing/shipping information in the

 private IPaymentResponse ProcessSale(IPaymentRequest data)

 Method inside the Process Sale's method but I am unsure how I can go about getting at the order's "product" details that they selected to purchase and the quantity's.

Can anyone point me in the right direction as to how one could do this.

 

Thanks!

Posted by Community Admin on 15-Sep-2015 00:00

Ok I realized I can hook the event when the site is boot strapped for..

EcommerceEvents.OrderPlaced += EcommerceEvents_OrderPlaced;

which returns to me the order id is there any elegant way to get the order out of the database or do I have to manually pull it from the db and what tables is this stored in.

Posted by Community Admin on 15-Sep-2015 00:00

// get order manager

var ordersManager = OrdersManager.GetManager();

// get our order by ID
var order = ordersManager.GetOrder(id);

 Figured it out thanks for AWESOME DOCUMENTATION!!

This thread is closed