protected function getDetailData()
{
$strings = [];
foreach ($this->getRefundItems() as $item) {
$item = (array) $item;
if (!isset($item['out_trade_no'])) {
throw new InvalidRequestException('The field `out_trade_no` is not exist in item');
}
if (!isset($item['amount'])) {
throw new InvalidRequestException('The field `amount` is not exist in item');
}
if (!isset($item['reason'])) {
throw new InvalidRequestException('The field `reason` is not exist in item');
}
$strings[] = implode('^', [$item['out_trade_no'], $item['amount'], $item['reason']]);
}
return implode('#', $strings);
}