国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
790B

  1. <?php
  2. if (!defined('DEDEINC')) exit ('dedebiz');
  3. try {
  4. //手动加载入口文件
  5. include "../include.php";
  6. //准备公众号配置参数
  7. $config = include "./config.php";
  8. //创建接口实例
  9. //$wechat = new \WeChat\Pay($config);
  10. //$wechat = \We::WeChatPay($config);
  11. $wechat = \WeChat\Pay::instance($config);
  12. //组装参数,可以参考官方商户文档
  13. $options = [
  14. 'transaction_id' => '1008450740201411110005820873',
  15. //'out_trade_no' => '商户订单号',
  16. //'out_refund_no' => '商户退款单号'
  17. //'refund_id' => '微信退款单号',
  18. ];
  19. $result = $wechat->queryRefund($options);
  20. var_export($result);
  21. } catch (Exception $e) {
  22. //出错啦,处理下吧
  23. echo $e->getMessage().PHP_EOL;
  24. }
  25. ?>