Pay.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: qisse
  5. * Date: 2017/6/27
  6. * Time: 20:02
  7. */
  8. namespace app\core\service;
  9. use app\core\model\Cang as Model;
  10. use app\core\model\Subject;
  11. use think\Config;
  12. use tool\Common;
  13. class Pay
  14. {
  15. private $platform;
  16. public function __construct()
  17. {
  18. $this->platform = Config::get('platform.default_pay_gateway');
  19. }
  20. //$money金额小数
  21. public function createOrder($money)
  22. {
  23. //富友平台
  24. if($this->platform == 'fuyou') {
  25. //富友平台
  26. vendor('fuyou.Pay');
  27. $pay = new \Pay();
  28. return $pay->createOrder($money * 100);
  29. }
  30. //支付宝平台
  31. else if($this->platform == 'alipay'){
  32. }
  33. return false;
  34. }
  35. public function notify() {
  36. //富友平台
  37. if($this->platform == 'fuyou') {
  38. //富友平台
  39. vendor('fuyou.PayNotify');
  40. $payNotify = new \PayNotify();
  41. return $payNotify->mobile();
  42. }
  43. //支付宝平台
  44. else if($this->platform == 'alipay'){
  45. }
  46. }
  47. }