I bought an O2 pay as you go phone last year as the one I wanted was not available on T Mobile. Even though I bought the phone and signed no agreemant, O2 would not allow me to have the unlock code so i could use my T Mobile sim in it, saying that even though it was pay as you go, the price was still cheaper than buying a phone minus a contract. I hope that goes someway to answering your question, and if so sorry it is not good news. On the other hand, quite strange this one, I got fed up with pay as you go and went back on contract this year, I gave my Mum the old phone and she tried her Orange sim in it and it worked, so it might be worth you going in to a shop and trying this theory out.
Hope you have some success
Shizz