Payment.php 687 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace app\index\controller;
  3. use think\Controller;
  4. use \think\Request;
  5. class Payment extends Base
  6. {
  7. public function __construct()
  8. {
  9. parent::__construct();
  10. }
  11. public function notify()
  12. {
  13. $param = input();
  14. $pay_type = $param['pay_type'];
  15. if ($GLOBALS['config']['pay'][$pay_type]['appid'] == '') {
  16. echo lang('index/payment_status');
  17. exit;
  18. }
  19. $cp = 'app\\common\\extend\\pay\\' . ucfirst($pay_type);
  20. if (class_exists($cp)) {
  21. $c = new $cp;
  22. $c->notify();
  23. }
  24. else{
  25. echo lang('index/payment_not');
  26. exit;
  27. }
  28. }
  29. }