A method based on a modularized automatic assembling payment gateway system includes the following steps: step 1, when an e-commerce platform is connected with any payment channel, seven interfaces about payment of the payment channel are extracted automatically; step 2, for any payment channel accessed to the e-commerce platform, a payment gateway realizes a cooperation e-commerce platform of the payment channel on the basis of interface modules constructed in the step 1; step 3, for the e-commerce platform, one payment interface module convenient for e-commerce users to use is abstracted; step 4, on the basis of a payment gateway formed by automatic assembling in the step 1 and the step 3, the payment gateway conducts maintenance management between the e-commerce platform and the payment channel; step 5, when the payment gateway receives payment, refund and money withdraw applications submitted by an e-commerce platform user, validity of requests of the e-commerce platform user is verified, verification including verification of cashier desk data and verification of a request source party; and step 6, after successful verification, the payment gateway sends request information of the e-commerce platform to the payment channel for processing through a corresponding payment interface, a corresponding money withdraw interface and a corresponding refund interface.