Update your API

We never heard why, but for some reason, Magento dropped a few APIs related to managing shipment and payment methods. We still have a few requests on Github pending, but in the meanwhile, we decided that we better write a bit of code ourselves. So, in order to sync shipment and payment methods, be sure to install the NcApi as part of your Commerce 365 Magento 2 extension.

Synchronize methods

Once your API is updated, synchronizing is easy. Just go to Sales Payment Methods and click Update Payment Methods. After this, all payment methods configured in Magento will now appear in the list, and you can start to complete the configuration by selecting the right Payment Method Code and Payment Terms Code.

New Order Status (Code) – This is a very important field because this is the status code the system will verify when trying to create a sales document from a staging order. In a standard Magento system, sales orders will first get an order status pending. And when a payment processer is in place, these will normally take a pending order, then start the payment process. And when a payment was successful, they set the order status to processing.
So, be sure, for each payment method, to provide the right status code.
See this page for more information on the order workflow in Magento. https://docs.magento.com/m2/ce/user_guide/sales/order-workflow.html
Typically for prepayment methods, you want to use a status code like ‘processing’. Because first the payment has to be processed correctly and then you want Business Central to process in the order. You definitely don’t want to process these orders at status ‘pending’, because at that point the payment processer still has to do its work.
For the non-prepayment methods, you do want to use status code ‘pending’, because those simply are not waiting to be processed by any processor, and you probably want to process them in Business Central directly.

New payment method?

Adding new payment methods is usually a thing that first requires a new payment module or method to be activated in Magento. Once this is done, go to the settings page in Business Central as described above, and click Update Payment Methods again. Your new method will automatically become visible and after configuring it it is ready for use.


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment