payment.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. return [
  3. 'accountTypes'=>[
  4. 1=>'订单收入',
  5. 2=>'充值保证金',
  6. 3=>'退保申请',
  7. 4=>'收入提现',
  8. 5=>'提现驳回',
  9. ],
  10. 'wechat' => [
  11. 'wechat'=>[
  12. 'default' => [
  13. // 必填-商户号
  14. 'mch_id' => '',
  15. // 必填-v3商户秘钥
  16. 'mch_secret_key' => '',
  17. // 必填-商户私钥 字符串或路径
  18. 'mch_secret_cert' => base_path().'/resources/certs/wechat/apiclient_key.pem',
  19. // 必填-商户公钥证书路径
  20. 'mch_public_cert_path' => base_path().'/resources/certs/wechat/apiclient_cert.pem',
  21. // 选填-微信公钥证书路径, optional,强烈建议 php-fpm 模式下配置此参数
  22. 'wechat_public_cert_path' => [
  23. //前面是证书***,登录商户平台【API安全】->【API证书】->【查看证书】,可查看商户API证书***
  24. //后面是通过前面的配置生成的文件 参考:http://www.liziyu.com/archives/309/
  25. 'PUB_KEY_ID_0117250041532025081400112188001803' => base_path().'/resources/certs/wechat/pub_key.pem',
  26. ],
  27. // 必填
  28. 'notify_url' => '',
  29. // 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE
  30. 'mode' => 0,
  31. ],
  32. ],
  33. 'logger' => [ // optional
  34. 'enable' => true,
  35. 'file' => base_path().'/storage/logs/wechat.log',
  36. 'level' => 'info', // 建议生产环境等级调整为 info,开发环境为 debug
  37. 'type' => 'single', // optional, 可选 daily.
  38. 'max_file' => 7, // optional, 当 type 为 daily 时有效,默认 30 天
  39. ],
  40. 'http' => [ // optional
  41. 'timeout' => 5.0,
  42. 'connect_timeout' => 5.0,
  43. ],
  44. ],
  45. 'alipay'=> [
  46. 'alipay' => [
  47. 'default' => [
  48. // 必填-支付宝分配的 app_id
  49. 'app_id' => '',
  50. // 必填-应用私钥 字符串或路径
  51. 'app_secret_cert' => '',
  52. // 必填-应用公钥证书 路径
  53. 'app_public_cert_path' => base_path().'/resources/certs/alipay/appCertPublicKey.crt',
  54. // 必填-支付宝公钥证书 路径
  55. 'alipay_public_cert_path' => base_path().'/resources/certs/alipay/alipayCertPublicKey_RSA2.crt',
  56. // 必填-支付宝根证书 路径
  57. 'alipay_root_cert_path' => base_path().'/resources/certs/alipay/alipayRootCert.crt',
  58. // 直接回调地址
  59. 'return_url' => '',
  60. // 必填
  61. 'notify_url' => '',
  62. // 'notify_url' => 'https://yansongda.cn/alipay/notify',
  63. // 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE
  64. 'mode' => 0,
  65. ]
  66. ],
  67. 'logger' => [ // optional
  68. 'enable' => true,
  69. 'file' => base_path().'/storage/logs/alipay.log',
  70. 'level' => 'info', // 建议生产环境等级调整为 info,开发环境为 debug
  71. 'type' => 'single', // optional, 可选 daily.
  72. 'max_file' => 7, // optional, 当 type 为 daily 时有效,默认 30 天
  73. ],
  74. 'http' => [ // optional
  75. 'timeout' => 5.0,
  76. 'connect_timeout' => 5.0,
  77. ],
  78. ],
  79. ];