Test.php 987 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php namespace Pay\Lib;
  2. use Dever;
  3. class Test extends Core
  4. {
  5. public function __construct($config)
  6. {
  7. $this->config = $config;
  8. }
  9. /**
  10. * 通知
  11. */
  12. public function notify()
  13. {
  14. }
  15. /**
  16. * 获取统一下单的基本信息
  17. */
  18. public function order($account_id, $project_id, $uid, $username, $product_id, $name, $cash, $openid = false, $type = 1, $order_id = false)
  19. {
  20. $order_id = $this->createOrder($uid, $username, $account_id, $project_id, $product_id, $name, $cash, 'test', $order_id);
  21. $this->updateOrder($order_id, $cash);
  22. return '';
  23. }
  24. /**
  25. * 获取二维码支付
  26. */
  27. public function qrcode($order, $refer)
  28. {
  29. return $order;
  30. }
  31. /**
  32. * 获取小程序支付
  33. */
  34. public function applet($order)
  35. {
  36. return $order;
  37. }
  38. /**
  39. * 获取页面支付
  40. */
  41. public function page($order, $refer)
  42. {
  43. return $order;
  44. }
  45. # 退款
  46. public function refund($order_id, $cash)
  47. {
  48. return true;
  49. }
  50. }