wechat.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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['card'] = array
  25. (
  26. 'name' => '发放优惠券',
  27. 'method' => 'post',
  28. 'json' => false,
  29. 'url' => 'https://open.youzan.com/api/oauthentry/youzan.ump.coupon/3.0.0/take?',
  30. 'param' => array
  31. (
  32. 'access_token' => 'token',
  33. 'coupon_group_id' => 'coupon_group_id',
  34. 'mobile' => 'mobile',
  35. 'weixin_openid' => 'weixin_openid',
  36. ),
  37. //针对一些返回的名称,做转换
  38. 'response' => array
  39. (
  40. ),
  41. );
  42. $config['get_msg'] = array
  43. (
  44. 'name' => '获取帐号下已存在的模板列表',
  45. 'method' => 'post',
  46. 'json' => true,
  47. 'url' => 'https://api.weixin.qq.com/cgi-bin/wxopen/template/list?',
  48. 'param' => array
  49. (
  50. 'access_token' => 'token',
  51. 'offset' => '0',
  52. 'count' => '20',
  53. ),
  54. //针对一些返回的名称,做转换
  55. 'response' => array
  56. (
  57. ),
  58. );
  59. return $config;