The secure payment gateway is necessary for ensuring the development of e-commerce. The breaking down of hash algorithm of MD5 and the like have imposed great potential security hazard on payment gateway. We have brought forward a kind of solution for enhancing the security of payment gateway and expounded the major key technique for security enhancing centering on the payment protocol which blends SSL and SET: optimize and realize AES algorithm and integrate it into SSL protocol, establish secure hash algorithm based on the optimized AES and integrate it into SSL protocol, design and implement security proxy and micro authority certificate (CA) system.