作者 王智

修改

@@ -420,15 +420,15 @@ class Common extends Api @@ -420,15 +420,15 @@ class Common extends Api
420 $PayOrderInfo = Db::name('pay_order')->where('OrderSn', $OrderSn['OrderSn'])->where('type', 1)->find(); 420 $PayOrderInfo = Db::name('pay_order')->where('OrderSn', $OrderSn['OrderSn'])->where('type', 1)->find();
421 $TuiMoney = $OrderSn['UpMoney'] + $OrderSn['Money']; 421 $TuiMoney = $OrderSn['UpMoney'] + $OrderSn['Money'];
422 //配置 422 //配置
423 - $config = [  
424 -// 'payment' => [  
425 - 'app_id' => 'wx6a9080f20326f817',  
426 - 'merchant_id' => '1603658973',  
427 - 'key' => '8695A8185xyzKcdEVfreewayShenzhen',  
428 - 'cert_path' => '/home/wwwroot/fast/book/addons/epay/certs/apiclient_cert.pem', // XXX: 绝对路径!!!!  
429 - 'key_path' => '/home/wwwroot/fast/book/addons/epay/certs/apiclient_key.pem', // XXX: 绝对路径!!!!  
430 -// ],  
431 - ]; 423 +// $config = [
  424 +//// 'payment' => [
  425 +// 'app_id' => 'wx6a9080f20326f817',
  426 +// 'merchant_id' => '1603658973',
  427 +// 'key' => '8695A8185xyzKcdEVfreewayShenzhen',
  428 +// 'cert_path' => '/home/wwwroot/fast/book/addons/epay/certs/apiclient_cert.pem', // XXX: 绝对路径!!!!
  429 +// 'key_path' => '/home/wwwroot/fast/book/addons/epay/certs/apiclient_key.pem', // XXX: 绝对路径!!!!
  430 +//// ],
  431 +// ];
432 $app = Factory::officialAccount($config); 432 $app = Factory::officialAccount($config);
433 try { 433 try {
434 $result = $app->refund->byTransactionId($PayOrderInfo['WeChatOrder'], $PayOrderInfo['PayOrder'], $PayOrderInfo['money'] * 100, $TuiMoney * 100); // 总金额 100, 退款 80,操作员:商户号 434 $result = $app->refund->byTransactionId($PayOrderInfo['WeChatOrder'], $PayOrderInfo['PayOrder'], $PayOrderInfo['money'] * 100, $TuiMoney * 100); // 总金额 100, 退款 80,操作员:商户号