bool Buyer::buyProduct(Product& product, int quantity){ if(true) { //Payment system here product.buy(this, quantity); return true; }else{ return false; //error payment } }