|
|
|
@ -136,7 +136,7 @@ class PaymentService implements PaymentServiceInterface |
|
|
|
'notify_url' => config('wechat.notify_url.refund'), |
|
|
|
] |
|
|
|
); |
|
|
|
var_dump('payresult', $result); |
|
|
|
|
|
|
|
if ($result['return_code'] == 'SUCCESS' && isset($result['result_code']) && $result['result_code'] == "SUCCESS") { |
|
|
|
return true; |
|
|
|
} else { |
|
|
|
@ -144,7 +144,7 @@ class PaymentService implements PaymentServiceInterface |
|
|
|
} |
|
|
|
} catch (\Exception $e) { |
|
|
|
$this->log->event(LogLabel::ORDER_REFUND_LOG, ['payment_do_exception_msg' => $e->getMessage()]); |
|
|
|
throw new ErrorCodeException(ErrorCode::REFUND_PAYMENT_FAIL, '[退款失败]'.$e->getMessage()); |
|
|
|
throw new ErrorCodeException(ErrorCode::REFUND_PAYMENT_FAIL); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
@ -209,15 +209,15 @@ class PaymentService implements PaymentServiceInterface |
|
|
|
$msg = $result['err_code_des']; |
|
|
|
} |
|
|
|
|
|
|
|
if ($result['err_code'] == 'SENDNUM_LIMIT') { |
|
|
|
throw new ErrorCodeException(ErrorCode::PAYMENT_SEND_NUM_LIMIT); |
|
|
|
} elseif ($result['err_code'] == 'V2_ACCOUNT_SIMPLE_BAN') { |
|
|
|
throw new ErrorCodeException(ErrorCode::PAYMENT_V2_ACCOUNT_SIMPLE_BAN); |
|
|
|
} elseif ($result['err_code'] == 'NAME_MISMATCH') { |
|
|
|
throw new ErrorCodeException(ErrorCode::PAYMENT_NAME_MISMATCH); |
|
|
|
} elseif ($result['err_code'] == 'AMOUNT_LIMIT') { |
|
|
|
throw new ErrorCodeException(ErrorCode::PAYMENT_AMOUNT_LIMIT); |
|
|
|
} |
|
|
|
// if ($result['err_code'] == 'SENDNUM_LIMIT') {
|
|
|
|
// throw new ErrorCodeException(ErrorCode::PAYMENT_SEND_NUM_LIMIT);
|
|
|
|
// } elseif ($result['err_code'] == 'V2_ACCOUNT_SIMPLE_BAN') {
|
|
|
|
// throw new ErrorCodeException(ErrorCode::PAYMENT_V2_ACCOUNT_SIMPLE_BAN);
|
|
|
|
// } elseif ($result['err_code'] == 'NAME_MISMATCH') {
|
|
|
|
// throw new ErrorCodeException(ErrorCode::PAYMENT_NAME_MISMATCH);
|
|
|
|
// } elseif ($result['err_code'] == 'AMOUNT_LIMIT') {
|
|
|
|
// throw new ErrorCodeException(ErrorCode::PAYMENT_AMOUNT_LIMIT);
|
|
|
|
// }
|
|
|
|
|
|
|
|
throw new ErrorCodeException(ErrorCode::WITHDRAW_PAYMENT_FAIL); |
|
|
|
} |
|
|
|
|