
381 Pa. Superior Ct. 348 (1989)
553 A.2d 1004
Irvin ROSEN and Sunny Rosen, H/W, Appellants,
v.
EMPIRE VALVE AND FITTING, INC. and Paul Silver, Appellees.
Supreme Court of Pennsylvania.
Submitted October 25, 1988.
Filed February 6, 1989.
*349 Arthur S. Cavaliere, Philadelphia, for appellants.
Harold Rosenthal, Philadelphia, for Empire, appellee.
Paul Silver, Philadelphia, propria persona.
Before CIRILLO, President Judge, and WIEAND and McEWEN, JJ.
WIEAND, Judge:
In this action to recover the down payment made by purchasers of real estate, the trial court sustained preliminary objections in the nature of a demurrer and dismissed the complaint. The issue to be decided on appeal is whether the provisions of the contract permit a recovery of the down *350 payment where a mortgage commitment, once issued, was later withdrawn.
On November 4, 1986, appellants, Irvin and Sunny Rosen, agreed to purchase from appellee, Empire Valve and Fitting, Inc., which agreed to sell, premises known as 1901 West Courtland Street, Philadelphia. The agreed price was $115,000. A down payment of $11,500 was made, and settlement was to be held on or before February 18, 1987. The agreement provided, in pertinent part, as follows:
4. This sale and settlement hereunder are NOT conditional or contingent in any manner upon the sale or settlement of any other real estate NOR subject to any mortgaging or financing except as hereinafter provided.
(a) Term and amount of mortgage required by Buyer: N/A years, $103,500.00
(b) Interest rate and type mortgage required by Buyer: Interest N/A %, Type See Paragraph 5(a)
(c) Commitment date for approval of mortgage: January 14, 1987
. . . .
(f) Mortgage application shall be made through the office of Buyers Choice and if said mortgage loan cannot be obtained, this agreement shall be null and void and all deposit monies shall be returned to the Buyer on or before date for settlement as provided herein.

. . . .
5. (a) This sale is contingent upon mortgage financing of the following type: Philadelphia Authority for Industrial Development (P.A.I.D.) tax free and Philadelphia Industrial Development Corporation (P.I.D.C.) direct financing through the Pennsylvania Loan Fund in the amount of $103,500.00. (emphasis added).
The agreement was subsequently amended by an undated memorandum which provided in part as follows:
The following paragraphs of the Agreement of Sale are modified. All other covenants remain in force as set forth:
.....

*351 3(g) Settlement to be made within ninety (90) days of mortgage commitment on a date to be determined by Seller and Buyer.
4(c) Commitment date for approval of mortgage required by Buyer: April 30, 1987.
5(c) Buyer shall proceed expeditiously to make application, cooperate and to attempt to obtain a mortgage. Any unreasonable delay by Buyer shall be a breach of Agreement.
5(d) Buyer shall keep Seller informed of efforts to obtain a mortgage and shall notify Seller immediately of approval or rejection of a mortgage commitment.
On April 30, 1987, the agreement was again modified. A second addendum extended the mortgage commitment date to June 30, 1987, and provided that "[s]ettlement is to be made within one hundred and twenty (120) days of mortgage commitment on a date to be determined by Buyer and Seller."
On June 18, 1987, the requested mortgage financing was approved by Philadelphia Industrial Development Corporation (PIDC), and the seller was duly notified. However, on September 21, 1987, before settlement had taken place, PIDC withdrew its commitment because of a substantial change in the financial circumstances of Foamland, Inc., a corporation which was to guarantee repayment of the mortgage loan. On September 23, 1987, the buyers notified the seller that they were unable to obtain the requisite financing and requested a return of the down payment. The seller refused to return the down payment, and this action by the buyers followed.[1]
In response to preliminary objections in the nature of a demurrer filed by the seller, the trial court interpreted the contract language to require the buyers to notify the seller of their inability to obtain mortgage financing before the mortgage commitment date. Because the buyers had notified the seller of PIDC's commitment prior to the commitment *352 date and the withdrawal of the commitment by PIDC had occurred after the commitment date, the trial court held that the buyers were not entitled to recover their down payment. Therefore, it sustained the seller's preliminary objections in the nature of a demurrer and dismissed the buyers' complaint.
A preliminary objection in the nature of a demurrer admits every well-pleaded fact and all inferences reasonably deducible therefrom. McGaha v. Matter, 365 Pa.Super. 6, 8, 528 A.2d 988, 989 (1987). It tests the legal sufficiency of the challenged pleadings and will be sustained only in cases where the pleader has clearly failed to state a claim for which relief can be granted. Mudd v. Hoffman Homes For Youth, Inc., 374 Pa.Super. 522, 524, 543 A.2d 1092, 1093 (1988). If there is any doubt as to whether a claim for relief has been stated, the trial court should resolve it against the demurring party. Mull v. Kerstetter, 373 Pa. Super. 228, 229, 540 A.2d 951, 951 (1988).
The interpretation to be given to an unambiguous contract is an issue of law for the court. Community College of Beaver County v. Community College of Beaver County, Society of the Faculty, 473 Pa. 576, 592, 375 A.2d 1267, 1275 (1977); Barium Steel Corp. v. Wiley, 379 Pa. 38, 44, 108 A.2d 336, 339 (1954). The contract in the instant case is clear and unambiguous. The parties unambiguously expressed their intention that the agreement would be subject to the condition that the buyers be able to obtain a PIDC loan to finance the purchase; and if this financing could not be obtained, the buyers were to be refunded their deposit. See Agreement of Sale, paragraphs 4(f) and 5(a). It is undisputed that PIDC has refused to provide mortgage financing for the purchase. Unless the buyers have been guilty of bad faith, therefore, the agreement, according to its terms, "is null and void and all deposit monies shall be returned to the Buyer. . . ." It follows that the facts pleaded in the complaint are sufficient to state a cause of action by the buyers for a return of their deposit. See, e.g.: Tieri v. Orbell, 192 Pa.Super. 612, 162 A.2d 248 (1960); Kleiman *353 v. Cohen, 98 Pa.Super. 61 (1929). See generally: 32 P.L.E. Sales of Realty § 192; 77 Am.Jur.2d Vendor and Purchaser § 66.
The parties had a right to make their own contract; a court should not give their agreement a construction which is in conflict with the plain meaning of the language used. Hagarty v. William Akers, Jr. Co., 342 Pa. 236, 239, 20 A.2d 317, 319 (1941). The language of the original agreement was clear. If mortgage financing could not be obtained, the agreement was to become null and void and the deposit was to be returned to the purchasers. See: Ormond Realty v. Ninnis, 341 Pa.Super. 101, 491 A.2d 169 (1985). This provision was not altered by the subsequent dates set by the parties' several addenda for obtaining the necessary mortgage commitment and for holding settlement. Robert F. Felte, Inc. v. White, 451 Pa. 137, 302 A.2d 347 (1973). The fact that a mortgage commitment, once obtained, was later cancelled or withdrawn, does not mean that the buyer must forfeit his deposit, provided that he has acted diligently and in good faith. See: Willeford v. Walker, 499 S.W.2d 190 (Tex.Civ.App. 1973). See also: Annotation, Sufficiency of Real-Estate Buyer's Efforts to Secure Financing Upon Which Sale is Contingent, 78 A.L.R.3d 880 § 9(a). The parties did not provide that the obligation to purchase would become absolute immediately upon the issuance of a mortgage commitment. Instead, the agreement unequivocally provided that "if said mortgage loan cannot be obtained, this agreement shall be null and void and all deposits monies shall be returned to the Buyer on or before date for settlement." A court cannot ignore but is bound to give effect to the conditions stated in a written agreement of sale which have been neither altered nor waived by the parties. See: Turk v. D. Katz & Sons, Inc., 254 Pa.Super. 177, 185, 385 A.2d 583, 587 (1978), citing Robert F. Felte, Inc. v. White, supra, 451 Pa. at 145, 302 A.2d at 351. See also: Wickes Corp. v. Newtown Savings Ass'n., 322 Pa.Super. 453, 463, 469 A.2d 1078, 1083 (1983).
*354 Because the buyers have sufficiently stated a cause of action against the seller for return of their deposit, the trial court erred when it sustained preliminary objections in the nature of a demurrer to the complaint.
Reversed and remanded for further proceedings. Jurisdiction is not retained.
NOTES
[1]  Paul Silver, the agent who is holding the down payment, was named as a defendant in addition to the seller.
