ShopPay.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. require("../class/connect.php");
  3. require("../class/db_sql.php");
  4. require("../class/q_functions.php");
  5. require("../member/class/user.php");
  6. eCheckCloseMods('pay');//关闭模块
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. //支付平台
  10. $paytype=RepPostVar($_GET['paytype']);
  11. if(!$paytype)
  12. {
  13. printerror('请选择支付平台','',1,0,1);
  14. }
  15. $payr=$empire->fetch1("select * from {$dbtbpre}enewspayapi where paytype='$paytype' and isclose=0 limit 1");
  16. if(!$payr[payid])
  17. {
  18. printerror('请选择支付平台','',1,0,1);
  19. }
  20. include('payfun.php');
  21. //订单信息
  22. $ddid=(int)getcvar('paymoneyddid');
  23. $ddr=PayApiShopDdMoney($ddid);
  24. $money=$ddr['tmoney'];
  25. if(!$money)
  26. {
  27. printerror('订单金额有误','',1,0,1);
  28. }
  29. $ddno=$ddr[ddno];
  30. $productname="支付订单号:".$ddno;
  31. $productsay="订单号:".$ddno;
  32. esetcookie("payphome","ShopPay",0);
  33. //返回地址前缀
  34. $PayReturnUrlQz=$public_r['newsurl'];
  35. if(!stristr($public_r['newsurl'],'://'))
  36. {
  37. $PayReturnUrlQz=eReturnDomain().$public_r['newsurl'];
  38. }
  39. //char
  40. if($ecms_config['sets']['pagechar']!='gb2312')
  41. {
  42. @include_once("../class/doiconv.php");
  43. $iconv=new Chinese('');
  44. $char=$ecms_config['sets']['pagechar']=='big5'?'BIG5':'UTF8';
  45. $targetchar='GB2312';
  46. $productname=$iconv->Convert($char,$targetchar,$productname);
  47. $productsay=$iconv->Convert($char,$targetchar,$productsay);
  48. @header('Content-Type: text/html; charset=gb2312');
  49. }
  50. $file=$payr['paytype'].'/to_pay.php';
  51. @include($file);
  52. db_close();
  53. $empire=null;
  54. ?>