MONEI / MONEI-Salesforce-Commerce-Cloud

Salesforce Commerce Cloud module for MONEI
https://docs.monei.com/docs/e-commerce/salesforce/
MIT License
0 stars 0 forks source link

order Payment status not updating #5

Closed federicogiampietro closed 1 year ago

federicogiampietro commented 1 year ago

Hello,

upon successfully calling the capture endpoint for a transaction created in MONEI the payment status of the order is never updated.

in the function authorize of the file int_monei_sfra/cartridge/scripts/monei/processor.js can you add an update of the order payment status if the capture endpoint does not return any error?

if (response.err) {
        return { error: true };
}else{
        Transaction.wrap(function () {
            [...]
            order.setPaymentStatus(dw.order.Order.PAYMENT_STATUS_PAID);  // update of the order payment status
        });
}