Skip to content

Erro no método createInvoice #353

@abraaomarques

Description

@abraaomarques

Há um erro no método createInvoice da classe: Pagarme\Pagarme\Observer\SalesOrderPlaceAfter

Há um return true logo no início do método:

`public function createInvoice($order)
{
return true;

    $payment
        ->setIsTransactionClosed(true)
        ->registerCaptureNotification(
            $order->getGrandTotal(),
            true
        );
    $order->save();
    // notify customer
    $invoice = $payment->getCreatedInvoice();
    if ($invoice && !$order->getEmailSent()) {
        $order->addStatusHistoryComment(
                'PGM - ' .
                __(
                    'Notified customer about invoice #%1.',
                    $invoice->getIncrementId()
                )
            )->setIsCustomerNotified(true)
            ->save();
    }

    return true;
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions