智简魔方文档

退款原渠道

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\RefundRecordModel::refundToGateway
所属业务订单管理
来源模块/系统退款记录模型

功能说明

退款原渠道

调用示例

$param = ['order_id' => 1, 'amount' => 0.01, 'gateway' => 'credit', 'client_id' => 1, 'host_id' => 1];
$result = (new \app\common\model\RefundRecordModel())->refundToGateway($param);

参数

参数类型必填默认值校验规则说明
param.order_idintrequire订单ID
param.amountfloatrequire退款金额
param.gatewaystringrequire退款网关
param.client_idintrequire用户ID
param.host_idint产品ID

返回值

返回项类型说明
transaction_idint流水ID
transaction_numberstring流水号

正常返回

{
  "transaction_id": 1,
  "transaction_number": "string"
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。