payment.php 3.2 KB

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