Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erro no método createInvoice #353

Open
abraaomarques opened this issue Jul 25, 2024 · 0 comments
Open

Erro no método createInvoice #353

abraaomarques opened this issue Jul 25, 2024 · 0 comments

Comments

@abraaomarques
Copy link

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;
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant