refactor trade for unionpay