When denial and anger don't have the intended outcome, in this case a mistaken diagnosis or miracle cure, many people will move on to bargaining. Most of us have already tried bargaining at some point in our lives. Children learn from an early age that getting angry with Mom when she says "no" doesn't work, but trying a different approach might. Just like the child who has time to rethink his anger and begin the process of bargaining with a parent, so do many people with a terminal illness.
Most people who enter the bargaining stage do so with their God. They may agree to live a good life, help the needy, never lie again, or any number of "good" things if their higher power will only cure them of their illness.
Other people may bargain with doctors or with the illness itself. They may try to negotiate more time saying things like, "If I can just live long enough to see my daughter get married..." or "If only I could ride my motorcycle one more time..." The implied return favor is that they would not ask for anything more if only their wish was granted. People who enter this stage quickly learn that bargaining doesn't work and inevitably move on, usually to the depression stage.