Legal analysis: Mental patients are generally persons with limited capacity for civil conduct, and their use of credit cards for shopping is an act whose validity is yet to be determined. After ratification by their legal representative, the act they performed is a valid civil law act. If his legal representative refuses to ratify, the mentally ill person's behavior such as swiping his card to make purchases will be invalid.
Legal basis: "The People's Republic of China and the Civil Code"
Article 22 Adults who cannot fully identify their own behavior are persons with limited capacity for civil conduct and perform civil legal acts. He shall be represented by his legal agent or with the consent or ratification of his legal agent; however, he may independently carry out civil legal acts purely for profit or civil legal acts commensurate with his intelligence and mental health.
Article 145: Civil legal acts performed by a person with limited capacity for civil conduct to obtain pure profits or civil legal acts commensurate with his age, intelligence, and mental health are valid; other civil legal acts performed by a person with limited capacity for civil conduct are valid. An act shall be effective upon consent or ratification by the legal agent. The counterparty may urge the legal agent to ratify the decision within thirty days from the date of receipt of the notice. If the legal representative fails to make any representation, it shall be deemed as a refusal to ratify. Before a civil legal act is ratified, a bona fide counterparty has the right to revoke it. Cancellation shall be made by notification.