AliLife.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace app\phpPay\hpay\pay;
  3. use crmeb\services\SystemConfigService;
  4. class AliLife extends Common
  5. {
  6. // 支付宝小程序支付:00002023
  7. // 支付宝生活号支付:00002022
  8. public $productId = '00002023'; //根据不同场景使用不同产品号
  9. // 参数映射
  10. protected function apiMap()
  11. {
  12. return array(
  13. 'orderPay' => array(
  14. 'method' => 'sandpay.trade.pay',
  15. 'url' => '/gateway/api/order/pay',
  16. ),
  17. 'orderQuery' => array(
  18. 'method' => 'sandpay.trade.query',
  19. 'url' => '/gateway/api/order/query',
  20. ),
  21. 'orderRefund' => array(
  22. 'method' => 'sandpay.trade.refund',
  23. 'url' => '/gateway/api/order/refund',
  24. ),
  25. 'clearfileDownload' => array(
  26. 'method' => 'sandpay.trade.download',
  27. 'url' => '/gateway/api/clearfile/download',
  28. ),
  29. );
  30. }
  31. protected function postData($method)
  32. {
  33. $this->publicKeyPath = SystemConfigService::get('site_url').SystemConfigService::get('public');
  34. $this->privateKeyPath = SystemConfigService::get('site_url').SystemConfigService::get('private');
  35. return parent::postData($method); // TODO: Change the autogenerated stub
  36. }
  37. public function request($apiName)
  38. {
  39. return parent::request($apiName); // TODO: Change the autogenerated stub
  40. }
  41. }