
216 Cal.App.2d 525 (1963)
MARION U. DIOWCHI, Petitioner,
v.
SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; SHARON KATHRYN MEADOW, Real Party in Interest.
Civ. No. 27159. 
California Court of Appeals. Second Dist., Div. Four.  
May 22, 1963.
 Beilenson, Meyer, Rosenfeld & Susman and Peter R. Cohen for Petitioner. *527
 No appearance for Respondent.
 Schwartz & Sandler and Merle H. Sandler for Real Party in Interest.
 KINGSLEY, J.
 Petitioner is the assignee for collection of a firm of attorneys. These attorneys (hereinafter collectively referred to as "Beilensons") were retained by the real party in interest to represent her in a divorce action. During the pendency of that action, respondent court made and entered its order directing the husband to pay directly to them the sum of $7,500 on account of attorney fees and $4,000 on account of costs. This order was secured by a lien, in favor of wife, on certain real and personal property. The husband duly appealed from this order (although it appears from the petition that $5,000 has been paid in partial satisfaction thereof) and that appeal is now pending in division three of this court (2d Civ. 27245). Thereafter, according to the petition, Beilensons filed in the divorce action a notice of motion for $13,000 additional fees. Before this motion came on for hearing, the wife purported to discharge Beilensons as her attorneys and moved to effect a substitution of new counsel. Both the motion of Beilensons for additional fees and the motion to substitute attorneys were continued, on motion of the husband, and are still pending in respondent court, subject to certain proceedings in the Supreme Court hereinafter discussed. While these matters were pending in respondent court, Beilensons filed a complaint in intervention in the divorce action, against husband, but not against the wife, seeking to protect the award of fees and costs already made in their favor and any additional award that might be made. This complaint is still pending in respondent court.
 It appears that the wife has, in the meantime, quitclaimed to her husband the property on which she held a lien to protect the Beilensons' award, that husband and wife have jointly moved to dismiss the divorce action, and that proceedings are now pending in the Supreme Court of this state to compel such dismissal or, in the alternative, to effect a substitution of the new attorneys for the wife prior to hearing Beilensons' motion for additional fees.  [fn. 1] (L.A. 27128.)
 In an attempt further to protect their claim for fees, Beilensons *528 then filed the action immediately involved in this proceeding. This action is a plenary action at law, against the wife only, alleging the original employment, an unlawful discharge of Beilensons as her attorneys in the divorce action, and praying for the reasonable value of their services in the divorce action. [1] The wife demurred to said complaint on the ground that there was another action pending between the same parties for the same cause. (Code Civ. Proc.,  430, subd. 3.) The demurrer was sustained, and the court made an order that "this action is abated until final determination" of the divorce action. A motion to vacate this order having been denied, petitioner sought from this court a writ of mandate to compel vacation of the order sustaining the demurrer and staying proceedings. Mandate is an appropriate method to test the validity of the order of the trial court herein involved. (Pacific Engine etc. Works v. Superior Court (1955) 132 Cal.App.2d 739 [282 P.2d 937].)
 [2] In her "Return, Demurrer and Answer" to the petition, the real party in interest seeks to controvert the allegations of petitioner as to the wrongfulness of the discharge of the attorneys. Such a denial has no place in this proceeding. We take the complaint in Diowchi v. Meadow as it stands; if its allegations are not true, or if real party in interest has any other defense to the claim for attorney fees, her remedy is to answer the complaint and litigate the issues so formed in the trial court.
 [3a] An attorney for a wife in a divorce action has two independent bases for collection of fees. As in any other matter, he may look to his own client for payment of his fees. Or, by virtue of the provisions of sections 137.3 and 137.5 of the Civil Code, he may look to the husband for fees payable under a court order. But the amount recoverable in the two instances are not the same. [4] As between attorney and the wife, in a divorce action, the recovery is either the amount agreed upon by contract or a recovery in quantum meruit. (Neblett v. Getty (1937) 20 Cal.App.2d 65 [66 P.2d 473].) [5] And, in case of discharge (whether or not for cause) the recovery may be in quantum meruit even though the retainer contract called for the attorney to look to his statutory claim against the husband. (Bergan v. Badham (1956) 142 Cal.App.2d Supp. 855, 856-857 [297 P.2d 815].) [6] But the statutory recovery against the husband is limited by his ability to pay, and also by the wife's ability to pay fees out of her own resources. (Loke v. Loke (1949) 95 Cal.App.2d 278 *529 [212 P.2d 553].) [3b] It follows that Beilensons' recovery, if any, against the husband, either under the motion for additional fees or under the complaint in intervention, may be for a lesser amount than that recoverable in the plenary action against the wife and will be based on a different duty and obligation.
 [7] Further, although section 137.5 of the Civil Code allows an order directing payment of fees and costs directly to the attorney, still the application for such an order must be made in the name of the wife and not in the name of the attorney. (See Weil v. Superior Court (1950) 97 Cal.App.2d 373 [217 P.2d 975].)
 [8] Since neither the parties, nor the cause of action, are the same in the case of Diowchi v. Meadow as in Meadow v. Meadow it follows that: The demurrer to the complaint in the Diowchi action should not have been sustained; the order sustaining such demurrer and ordering an abatement should be vacated, the demurrer should be overruled and the real party in interest be permitted to answer or otherwise plead as she may be advised.
 Let a peremptory writ of mandate issue, directing respondent court: to vacate its order of February 3, 1963, in the case of Marion U. Diowchi v. Sharon Kathryn Meadow, being action No. 807152 in the files of said court; to overrule said demurrer; and to grant defendant in said action a reasonable time within which to answer or otherwise plead to the complaint on file therein.
 Burke, P. J., concurred.
 Jefferson, J., did not participate.
NOTES
[fn. 1]  1. In view of the pendency of these proceedings, we do not comment on the propriety of either the motion or the complaint in intervention. Cf. Schwartz v. Schwartz (1953) 119 Cal.App.2d 102 [259 P.2d 33].
