|
@@ -108,11 +108,12 @@ class PaymentProvider implements PaymentProviderInterface
|
|
|
$inBody = $request['inBody'];
|
|
$inBody = $request['inBody'];
|
|
|
$data = $this->notifyService->transactionSuccess($request['headers'], json_encode($request['inBody']));
|
|
$data = $this->notifyService->transactionSuccess($request['headers'], json_encode($request['inBody']));
|
|
|
if ($inBody['event_type'] !== 'TRANSACTION.SUCCESS') {
|
|
if ($inBody['event_type'] !== 'TRANSACTION.SUCCESS') {
|
|
|
- throw new \RuntimeException('Not implemented: ' . $inBody['event_type']);
|
|
|
|
|
|
|
+ Log::warning('Not implemented: ' . $inBody['event_type']. ' ' . json_encode($data));
|
|
|
|
|
+ throw_logic_exception('Not implemented: ' . $inBody['event_type']);
|
|
|
}
|
|
}
|
|
|
Log::debug(__METHOD__ . json_encode($data));
|
|
Log::debug(__METHOD__ . json_encode($data));
|
|
|
$payment = $this->extensionPaymentEntity->where([
|
|
$payment = $this->extensionPaymentEntity->where([
|
|
|
- 'out_trade_no' => $inBody['data']['out_trade_no'],
|
|
|
|
|
|
|
+ 'out_trade_no' => $data['out_trade_no'],
|
|
|
])->findOrEmpty();
|
|
])->findOrEmpty();
|
|
|
if ($payment->isEmpty()) {
|
|
if ($payment->isEmpty()) {
|
|
|
throw new \RuntimeException('订单不存在或已结束');
|
|
throw new \RuntimeException('订单不存在或已结束');
|