Implement the AutofillPaymentInstrument class functionality in C++ as required by the provided unit tests. The objectives are as follows:
Constructors: Ensure the constructor of AutofillPaymentInstrument initializes its member variables correctly using the provided parameters, including payment method, credit card details, billing profiles, locale, and a possible payments client delegate.
Method: IsCompleteForPayment:
The method should return true if the credit card is complete and valid for payment.
A credit card is complete if:
It has a name associated with it.
It has a valid card number (not empty).
It has a billing address ID that matches one from the provided billing profiles.
If any of the above conditions are not met, return false.
Method: GetMissingInfoLabel:
If the card is incomplete, return a localized string for the missing information based on the criteria:
If the name is missing, return IDS_PAYMENTS_NAME_ON_CARD_REQUIRED.
If the number is missing, return IDS_PAYMENTS_CARD_NUMBER_INVALID_VALIDATION_MESSAGE.
If the billing address ID is missing or invalid, return IDS_PAYMENTS_CARD_BILLING_ADDRESS_REQUIRED.
If multiple pieces of information are missing, return IDS_PAYMENTS_MORE_INFORMATION_REQUIRED.
Method: IsValidForCanMakePayment:
This method should return true if the credit card can be used for payment, regardless of its expiration status, but it must still have a valid name and number.
Return false if the name or number is missing.
Handling of Expired Cards: The implementation should allow expired cards for both payment completion and the can-make-payment validation, as indicated in the tests.
Integration with Payment Request: Ensure the InvokePaymentApp method interacts correctly with payment request delegates to manage the lifecycle of payment processing and handle address normalization.
Place the complete implementation in /app/AutofillPaymentInstrument.cpp and ensure that the new implementation passes all the existing tests in AutofillPaymentInstrumentTest.