This script will work like Upwork escrow. Every escrow has an expiration time. The buyer will create an escrow which will be shown in the buyer and seller dashboard as pending. The buyer can release payment anytime. If any dispute occurs then the buyer will request to admin to refund that escrow. Admin will investigate the issue and refund if needed before the expiration time. The seller can also refund. After the expiration time, if no dispute or release payment happens, the seller can claim the escrow funds by himself.