diff --git a/app/Libs/AlipayF2F.class.php b/app/Libs/AlipayF2F.class.php index 3d59081..6bcefd0 100644 --- a/app/Libs/AlipayF2F.class.php +++ b/app/Libs/AlipayF2F.class.php @@ -97,10 +97,7 @@ class AlipayF2F public function refund(Refund $refund) { try { - $relatedRecharge = $refund->relatedRecharge; - $merchantId = $relatedRecharge->merchant_id; - $alipayAccount = AlipayAccount::where('appid', $merchantId)->withTrashed()->first(); - + $alipayAccount = AlipayAccount::where('appid', $refund->merchant_id)->withTrashed()->first(); $config = $this->getOptions($alipayAccount); $result = Factory::setOptions($config)::payment()