Receiving the price of sold gold in the same meeting
If the matter is as you have mentioned, this sale is not permissible because
the price of the gold, which is the money in the session, was not received when the contract was concluded. Both the seller and the buyer will bear a part of the sin according to the sin she committed.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.