PosGateway.php 881 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Yansongda\Pay\Gateways\Alipay;
  3. class PosGateway extends Alipay
  4. {
  5. /**
  6. * get method config.
  7. *
  8. * @author yansongda <me@yansongda.cn>
  9. *
  10. * @return string
  11. */
  12. protected function getMethod()
  13. {
  14. return 'alipay.trade.pay';
  15. }
  16. /**
  17. * get productCode config.
  18. *
  19. * @author yansongda <me@yansongda.cn>
  20. *
  21. * @return string
  22. */
  23. protected function getProductCode()
  24. {
  25. return 'FACE_TO_FACE_PAYMENT';
  26. }
  27. /**
  28. * pay a order.
  29. *
  30. * @author yansongda <me@yansongda.cn>
  31. *
  32. * @param array $config_biz
  33. * @param string $scene
  34. *
  35. * @return array|bool
  36. */
  37. public function pay(array $config_biz = [], $scene = 'bar_code')
  38. {
  39. $config_biz['scene'] = $scene;
  40. return $this->getResult($config_biz, $this->getMethod());
  41. }
  42. }