The contract stipulates that the quality of the goods is Grade III, and according to the principle of "single contract is consistent" in the payment method of the letter of credit, the invoice is required to reflect the quality of the goods as Grade III. And company A indicates on the invoice that "the goods are second-class", which is inconsistent with the contract, and the bank can refuse to pay. Although the quality of the goods delivered by company A is higher than that stipulated in the contract, the company still can't get the payment.
In fact, even if company A delivers second-class goods, as long as the quality of the goods is still "third-class" on invoices and other documents, the company can get the payment, because the payment method of the letter of credit only cares about the goods, and as long as it is "consistent", the bank must pay.