更新时间:2023-11-30 13:41:52
主要取决于将发票设置为paid
或pending
的付款方式设置.
mainly it depend on the payment method settings that your invoice will be set as paid
or pending
.
如果指定了付款方式:
检查以下代码以将发票设置为待处理.
check the below code for setting invoice as pending.
protected $_canCapture = true;
protected $_canCapturePartial = true;
$emailInvoice = true;
$captureInvoice = false;
$invoiceApi = Mage::getModel('sales/order_invoice_api');
$invoiceId = $invoiceApi->create(
$order->getIncrementId(),
array(),
Mage::helper('sales')->__('Pending Invoice created!'),
$emailInvoice,
false
);
if ($captureInvoice) {
$invoiceApi->capture($invoiceId);
}