|
|
@@ -149,7 +149,7 @@ class PaymentProvider implements PaymentProviderInterface
|
|
|
$refund->refund_result = $result;
|
|
|
$refund->save();
|
|
|
if ($result->status === 'SUCCESS' || $result->status === 'PROCESSING') {
|
|
|
- QueryRefundJob::dispatch($refund->id)->delay(10);
|
|
|
+ QueryRefundJob::dispatch($refund->id)->delay(20);
|
|
|
} else {
|
|
|
throw new \RuntimeException(match ($result->status) {
|
|
|
'CLOSED' => '退款关闭',
|
|
|
@@ -170,12 +170,15 @@ class PaymentProvider implements PaymentProviderInterface
|
|
|
$refund->refund_result = $result;
|
|
|
if ($result->status === 'SUCCESS') {
|
|
|
$refund->status = RefundStatusEnum::SUCCESS;
|
|
|
+ $refund->status_desc = '成功退款到'.$result->user_received_account;
|
|
|
$refund->success_time = strtotime($result->success_time);
|
|
|
Event::trigger(new RefundSuccessEvent(
|
|
|
$refund->model(),
|
|
|
$refund->payment,
|
|
|
new PaymentRefundRequest($refund->amount,$refund->reason, $refund->refund_param))
|
|
|
);
|
|
|
+ } else if ($result->status === 'PROCESSING') {
|
|
|
+ QueryRefundJob::dispatch($refund->id)->delay(10);
|
|
|
}
|
|
|
$refund->save();
|
|
|
}
|