修正退款回调url
This commit is contained in:
parent
8ea79574dc
commit
866387c698
@ -110,8 +110,8 @@ class UserController extends AbstractController
|
|||||||
$options['out_refund_no'] = $order_inquiry['inquiry_refund_no'];
|
$options['out_refund_no'] = $order_inquiry['inquiry_refund_no'];
|
||||||
$options['reason'] = "退款原因";
|
$options['reason'] = "退款原因";
|
||||||
$options['amount'] = [
|
$options['amount'] = [
|
||||||
'refund' => 0.01 * 100,
|
'refund' => (int)1,
|
||||||
'total' => 0.01 * 100,
|
'total' => (int)1,
|
||||||
'currency' => "CNY",
|
'currency' => "CNY",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
60
app/Model/OrderInquiryRefund.php
Normal file
60
app/Model/OrderInquiryRefund.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace App\Model;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
use Hyperf\Snowflake\Concern\Snowflake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property int $inquiry_refund_id 主键id
|
||||||
|
* @property int $patient_id 患者id
|
||||||
|
* @property int $order_inquiry_id 订单-问诊id
|
||||||
|
* @property string $inquiry_no 系统订单编号
|
||||||
|
* @property string $out_refund_no 系统退款编号
|
||||||
|
* @property string $refund_id 第三方退款单号
|
||||||
|
* @property int $inquiry_refund_status 问诊订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭)
|
||||||
|
* @property string $success_time 退款成功时间
|
||||||
|
* @property \Carbon\Carbon $created_at 创建时间
|
||||||
|
* @property \Carbon\Carbon $updated_at 修改时间
|
||||||
|
*/
|
||||||
|
class OrderInquiryRefund extends Model
|
||||||
|
{
|
||||||
|
use Snowflake;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table associated with the model.
|
||||||
|
*/
|
||||||
|
protected ?string $table = 'order_inquiry_refund';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable.
|
||||||
|
*/
|
||||||
|
protected array $fillable = ['inquiry_refund_id', 'patient_id', 'order_inquiry_id', 'inquiry_no', 'out_refund_no', 'refund_id', 'inquiry_refund_status', 'success_time', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
|
protected string $primaryKey = "inquiry_refund_id";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取信息-单条
|
||||||
|
* @param array $params
|
||||||
|
* @param array $fields
|
||||||
|
* @return object|null
|
||||||
|
*/
|
||||||
|
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||||
|
{
|
||||||
|
return self::where($params)->first($fields);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取信息-多条
|
||||||
|
* @param array $params
|
||||||
|
* @param array $fields
|
||||||
|
* @return object|null
|
||||||
|
*/
|
||||||
|
public static function getList(array $params, array $fields = ['*']): object|null
|
||||||
|
{
|
||||||
|
return self::where($params)->get($fields);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -179,7 +179,7 @@ class WechatPay
|
|||||||
$app = $this->createApp();
|
$app = $this->createApp();
|
||||||
|
|
||||||
$options['notify_url'] = env('DOMAIN_NAME_DEV') . $this->config['refund_notify_url'];
|
$options['notify_url'] = env('DOMAIN_NAME_DEV') . $this->config['refund_notify_url'];
|
||||||
|
dump($options);die;
|
||||||
$response = $app->getClient()->postJson("v3/refund/domestic/refunds", $options);
|
$response = $app->getClient()->postJson("v3/refund/domestic/refunds", $options);
|
||||||
if ($response->isFailed()) {
|
if ($response->isFailed()) {
|
||||||
// 出错了,处理异常
|
// 出错了,处理异常
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user