Api.php 572 B

1234567891011121314151617181920212223
  1. <?php namespace Api\Lib;
  2. use Dever;
  3. class Api extends Platform
  4. {
  5. protected $type = 'api';
  6. # 执行某个接口
  7. public function run($id, $param = array())
  8. {
  9. $state = $this->setting($id, $param);
  10. if (!$state) {
  11. return $state;
  12. }
  13. return $this->curl();
  14. }
  15. # 生成回调
  16. protected function createNotify($order_num)
  17. {
  18. $encode = \Dever\Helper\Str::encode($this->info['id'] . '|' . $order_num);
  19. return Dever::url('api/notify.common', array('s' => $encode));
  20. }
  21. }