wechat.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. # 小程序基本配置
  3. $config['type'] = 7;
  4. $config['token'] = array
  5. (
  6. 'name' => '获取有赞的token',
  7. 'method' => 'post',
  8. 'json' => true,
  9. 'url' => 'https://open.youzan.com/oauth/token?',
  10. 'param' => array
  11. (
  12. 'client_id' => 'appid',
  13. 'client_secret' => 'secret',
  14. 'grant_type' => 'silent',
  15. 'kdt_id' => 'key',
  16. ),
  17. //针对一些返回的名称,做转换
  18. 'response' => array
  19. (
  20. 'access_token' => 'token',
  21. 'expires_in' => 'expires_in',
  22. ),
  23. );
  24. $config['reg'] = array
  25. (
  26. 'name' => '注册客户',
  27. 'method' => 'post',
  28. 'json' => false,
  29. 'url' => 'https://open.youzan.com/api/oauthentry/youzan.scrm.customer/3.0.0/create?',
  30. 'param' => array
  31. (
  32. 'access_token' => 'token',
  33. 'customer_create' => 'customer_create',
  34. 'mobile' => 'mobile',
  35. ),
  36. //针对一些返回的名称,做转换
  37. 'response' => array
  38. (
  39. ),
  40. );
  41. $config['card'] = array
  42. (
  43. 'name' => '发放优惠券',
  44. 'method' => 'post',
  45. 'json' => false,
  46. 'url' => 'https://open.youzan.com/api/oauthentry/youzan.ump.coupon/3.0.0/take?',
  47. 'param' => array
  48. (
  49. 'access_token' => 'token',
  50. 'coupon_group_id' => 'coupon_group_id',
  51. 'mobile' => 'mobile',
  52. 'weixin_openid' => 'weixin_openid',
  53. ),
  54. //针对一些返回的名称,做转换
  55. 'response' => array
  56. (
  57. ),
  58. );
  59. $config['card_create'] = array
  60. (
  61. 'name' => '生成优惠券',
  62. 'method' => 'post',
  63. 'json' => false,
  64. 'url' => 'https://open.youzan.com/api/oauthentry/youzan.ump.promocard/3.0.0/add?',
  65. 'param' => array
  66. (
  67. 'access_token' => 'token',
  68. 'at_least' => 'at_least',
  69. 'can_give_friend' => 'can_give_friend',
  70. 'date_type' => 'date_type',
  71. 'description' => 'description',
  72. 'discount' => 'discount',
  73. 'end_at' => 'end_at',
  74. 'expire_notice' => 'expire_notice',
  75. 'fixed_begin_term' => 'fixed_begin_term',
  76. 'fixed_term' => 'fixed_term',
  77. 'is_at_least' => 'is_at_least',
  78. 'is_forbid_preference' => 'is_forbid_preference',
  79. 'is_random' => 'is_random',
  80. 'is_share' => 'is_share',
  81. 'is_sync_weixin' => 'is_sync_weixin',
  82. 'mark_tag_ids' => 'mark_tag_ids',
  83. 'need_user_level' => 'need_user_level',
  84. 'preferential_type' => 'preferential_type',
  85. 'quota' => 'quota',
  86. 'range_type' => 'range_type',
  87. 'service_phone' => 'service_phone',
  88. 'specify_item_ids' => 'specify_item_ids',
  89. 'start_at' => 'start_at',
  90. 'title' => 'title',
  91. 'total' => 'total',
  92. 'value' => 'value',
  93. 'value_random_to' => 'value_random_to',
  94. 'weixin_color' => 'weixin_color',
  95. 'weixin_color_rgb' => 'weixin_color_rgb',
  96. 'weixin_sub_title' => 'weixin_sub_title',
  97. 'weixin_title' => 'weixin_title',
  98. ),
  99. //针对一些返回的名称,做转换
  100. 'response' => array
  101. (
  102. ),
  103. );
  104. return $config;