Shipment completed and generate invoice but order status showing Processing and invoice is in pending.
Also invoice showing a Capture button.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityYou need to select capture option during invoice creation
if you select
Capture Offline
When the invoice is submitted, the system does not capture the payment. It is assumed that the payment is captured directly through the gateway, and you no longer have the option to capture this payment through Magento. Invoice status goes to Paid
Capture online
When the invoice is submitted, the system captures the payment from the third-party payment gateway like when you charge credit cards using any gateway. Invoice status goes to Pending
.
Not Capture
When the invoice is submitted, the system does not capture the payment. It is assumed that you will capture the payment through Magento at a later date. There is a Capture button in the completed invoice. Before capturing, you are able to cancel the invoice.
For Reference: https://docs.magento.com/m2/ce/user_guide/sales/invoice-create.html
I hope this will help
In DB change 'state' Column value to "2" in 'sales_invoice_grid' table.
and
In DB change 'state' Column value to "2" in 'sales_invoice' table.
and
In DB change 'state' and 'status' Column value to "complete" in 'sales_order' table.