update purchase code