mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-14 12:32:50 +00:00
修复支付回调报错和退款后台配置理由报错
This commit is contained in:
parent
2ec4818d21
commit
238b06279d
File diff suppressed because one or more lines are too long
@ -77,8 +77,9 @@ class AuthApi extends AuthController{
|
||||
* 获取退款理由
|
||||
*/
|
||||
public function get_refund_reason(){
|
||||
$reason = SystemConfig::getValue('refund_reason')?:[];//退款理由
|
||||
$reason = explode('=',$reason);
|
||||
$reason = SystemConfig::getValue('stor_reason')?:[];//退款理由
|
||||
$reason = str_replace("\r\n","\n",$reason);//防止不兼容
|
||||
$reason = explode("\n",$reason);
|
||||
return JsonService::successful($reason);
|
||||
}
|
||||
|
||||
@ -861,6 +862,7 @@ class AuthApi extends AuthController{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 申请退款
|
||||
* @param string $uni
|
||||
|
||||
@ -4,6 +4,7 @@ use behavior\wechat\PaymentBehavior;
|
||||
use service\HookService;
|
||||
use service\RoutineNotify;
|
||||
|
||||
|
||||
/**
|
||||
* 小程序支付回调
|
||||
* Class Routine
|
||||
|
||||
@ -113,6 +113,11 @@ class PaymentBehavior
|
||||
WechatService::payOrderRefund($orderNo,$opt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 小程序支付订单退款
|
||||
* @param $orderNo
|
||||
* @param array $opt
|
||||
*/
|
||||
public static function routinePayOrderRefund($orderNo, array $opt)
|
||||
{
|
||||
$refundDesc = isset($opt['desc']) ? $opt['desc'] : '';
|
||||
|
||||
@ -22,6 +22,7 @@ class RoutineRefund
|
||||
* @param string $refundDesc 退款原因
|
||||
* @return string
|
||||
*/
|
||||
|
||||
public static function doRefund($totalFee, $refundFee, $refundNo, $wxOrderNo='',$orderNo='',$refundDesc = '')
|
||||
{
|
||||
$config = array(
|
||||
@ -94,11 +95,11 @@ class RoutineRefund
|
||||
//默认格式为PEM,可以注释
|
||||
curl_setopt($ch,CURLOPT_SSLCERTTYPE,'PEM');
|
||||
// curl_setopt($ch,CURLOPT_SSLCERT,getcwd().'/cert/apiclient_cert.pem');
|
||||
curl_setopt($ch,CURLOPT_SSLCERT,realpath('.'.self::options()['pay_routine_client_cert'][0]));
|
||||
curl_setopt($ch,CURLOPT_SSLCERT,realpath('.'.self::options()['pay_routine_client_cert']));
|
||||
//默认格式为PEM,可以注释
|
||||
curl_setopt($ch,CURLOPT_SSLKEYTYPE,'PEM');
|
||||
// curl_setopt($ch,CURLOPT_SSLKEY,getcwd().'/cert/apiclient_key.pem');
|
||||
curl_setopt($ch,CURLOPT_SSLKEY,realpath('.'.self::options()['pay_routine_client_key'][0]));
|
||||
curl_setopt($ch,CURLOPT_SSLKEY,realpath('.'.self::options()['pay_routine_client_key']));
|
||||
//第二种方式,两个文件合成一个.pem文件
|
||||
// curl_setopt($ch,CURLOPT_SSLCERT,getcwd().'/all.pem');
|
||||
$data = curl_exec($ch);
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
namespace service;
|
||||
use think\Url;
|
||||
|
||||
|
||||
/**
|
||||
* 小程序支付
|
||||
* Created by PhpStorm.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user