payment.php 3.3 KB

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