prepaidHandler.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*-----------------------------------------------
  2. *本文件由代码生成器自动生成,
  3. *千万不要修改本文件的任何代码,
  4. *修改的的任何代码都会被覆盖掉!
  5. --------------------------------------------------*/
  6. var async = require('asyncawait/async');
  7. var await = require('asyncawait/await');
  8. var PrepaidHandler = function(socket){
  9. this.socket = socket;
  10. }
  11. PrepaidHandler.prototype.prepaidSDKRequest = async(function(s2c_param){
  12. return await(this.socket.requestAsync('area.prepaidHandler.prepaidSDKRequest',{s2c_param:s2c_param}));
  13. });
  14. PrepaidHandler.prototype.prepaidListRequest = async(function(productType){
  15. return await(this.socket.requestAsync('area.prepaidHandler.prepaidListRequest',{productType:productType}));
  16. });
  17. PrepaidHandler.prototype.prepaidAwardRequest = async(function(id){
  18. return await(this.socket.requestAsync('area.prepaidHandler.prepaidAwardRequest',{id:id}));
  19. });
  20. PrepaidHandler.prototype.prepaidAPPRequest = async(function(s2c_param){
  21. return await(this.socket.requestAsync('area.prepaidHandler.prepaidAPPRequest',{s2c_param:s2c_param}));
  22. });
  23. PrepaidHandler.prototype.prepaidOrderIdRequest = async(function(c2s_productId,c2s_channelId,c2s_imei,c2s_os){
  24. return await(this.socket.requestAsync('area.prepaidHandler.prepaidOrderIdRequest',{c2s_productId:c2s_productId,c2s_channelId:c2s_channelId,c2s_imei:c2s_imei,c2s_os:c2s_os}));
  25. });
  26. PrepaidHandler.prototype.prepaidFirstAwardRequest = async(function(){
  27. return await(this.socket.requestAsync('area.prepaidHandler.prepaidFirstAwardRequest',{}));
  28. });
  29. PrepaidHandler.prototype.onPaySuccessPush = function(cb){
  30. this.socket.on('area.prepaidHandler.paySuccessPush',cb);
  31. }
  32. module.exports = PrepaidHandler;