Jump to content

Edit History

mr_david

mr_david

Hi all,

I'm trying to make a refund base on the docs provided for prestashop 1.7.7. 

$command = new IssuePartialRefundCommand (
      $orderId,
      $refund_information['refund_items'],
      $refund_information['shipping_amount'],
      (bool)$refund_information['restock'],
      (bool)$refund_information['credit_slip'],
      (bool)$refund_information['voucher'],
      (int)$refund_information['voucher_refund_type'], 
);

$commandBus = $this->get('prestashop.core.command_bus');
$commandBus->handle($command);

But I does not work, it seems that $commandBus is null. Is there anything more I have to configure to load the command_bus ?

 

mr_david

mr_david

Hi all,

I'm trying to make a refund base on the docs provided for prestashop 1.7.7. 

$command = new IssuePartialRefundCommand (
      $orderId,
      $refund_information['refund_items'],
      $refund_information['shipping_amount'],
      (bool)$refund_information['restock'],
      (bool)$refund_information['credit_slip'],
      (bool)$refund_information['voucher'],
      (int)$refund_information['voucher_refund_type'], 
);

$commandBus = $this->get('prestashop.core.command_bus');
$commandBus->handle($command);

But I does not work, it seems that $commandBus is null. Is there anything more I have to configure to load the command_bus ?

 

×
×
  • Create New...