현금영수증 발급사를 PG 결제사와 독립적으로 선택할 수 있도록 공용 훅 축 (registered_providers/issue/cancel)에 토스·KG 프로바이더를 등록한다. KG 결제로 받으면서 영수증만 토스로 발급하는 구성이 가능해진다. KG 전용 발행 컨트롤러· 라우트·관리자 패널은 이 축으로 이전하며 제거했다 — 이중 발행 경로를 남기지 않기 위해서다. 토스 환불은 네 가지를 바로잡았다. 전액취소를 부분취소로 보내던 문제(R1), 면세금액 미전달로 복합과세 상점의 부가세가 틀어지던 문제(R2), 가상계좌 환불계좌를 싣지 않아 취소가 실패하던 문제(R3), 에스크로 부분취소를 PG 호출 전에 차단하지 않던 문제(E4). 취소·발급 요청에는 멱등키를 부착해 네트워크 재시도가 국세청에 이중 신고되거나 이중 환불되는 것을 막는다. 코어 활동로그 가드가 \Exception 만 잡아 채널 해석 실패(\Error)를 놓치고 있었다. 결제 입금통보 같은 외부 콜백이 로그 문제만으로 500을 반환하던 문제를 \Throwable 로 수정한다. 활동로그는 부수 기록이므로 그것을 유발한 요청까지 죽여서는 안 된다. 토스 API 서비스는 베이스 \Exception 을 직접 던지고 있어 도메인 예외 (TossPaymentsApiException)를 신설했다. KG의 KgInicisApiException 선례와 동형이며 RuntimeException 상속이라 기존 소비자의 catch 는 그대로 동작한다.
55 lines
2.9 KiB
PHP
55 lines
2.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
return [
|
|
'errors' => [
|
|
'cash_receipt_issue_failed' => 'Failed to issue cash receipt.',
|
|
'order_not_found' => 'Order not found.',
|
|
'cbt_failed' => 'Failed to process the cross-border payment.',
|
|
],
|
|
'cash_receipt' => [
|
|
'provider_name' => 'KG Inicis',
|
|
],
|
|
'refund' => [
|
|
'missing_tid' => 'Cannot process refund: transaction ID (TID) is missing.',
|
|
'default_reason' => 'Buyer refund request',
|
|
],
|
|
'cbt_connectivity' => [
|
|
'checked' => 'Connectivity diagnostic completed.',
|
|
'check_failed' => 'Connectivity diagnostic failed.',
|
|
],
|
|
'cbt_reconciliation' => [
|
|
'not_retryable' => 'This CBT refund item is not retryable.',
|
|
'retry_success' => 'CBT refund retry completed.',
|
|
'retry_failed' => 'CBT refund retry failed.',
|
|
],
|
|
'settings_validation' => [
|
|
'test_japan_sign_key_required' => 'The test Japan CBT hash key is required to use Japan payment (CBT).',
|
|
'live_japan_mid_required' => 'The live Japan MID is required to use Japan payment (CBT) in live mode.',
|
|
'live_japan_sign_key_required' => 'The live Japan CBT hash key is required to use Japan payment (CBT) in live mode.',
|
|
'japan_merchant_name_required' => 'Merchant name for the live Japan payment window is required.',
|
|
'japan_merchant_name_kana_required' => 'Merchant name Kana for the live Japan payment window is required.',
|
|
'japan_merchant_name_alphabet_required' => 'Alphabet merchant name for the live Japan payment window is required.',
|
|
'japan_merchant_name_short_required' => 'Short merchant name for the live Japan payment window is required.',
|
|
'japan_contact_name_required' => 'Contact name for the live Japan payment window is required.',
|
|
'japan_contact_email_required' => 'Contact email for the live Japan payment window is required.',
|
|
'japan_contact_phone_required' => 'Contact phone for the live Japan payment window is required.',
|
|
'japan_contact_opening_hours_required' => 'Contact opening hours for the live Japan payment window are required.',
|
|
'replace_sample_value' => 'Replace the sample Japan merchant display information with your real contract information in live mode.',
|
|
],
|
|
'defaults' => [
|
|
'good_name' => 'Goods',
|
|
],
|
|
'cbt_cvs' => [
|
|
'simulate_success' => 'Deposit simulation completed.',
|
|
'simulate_failed' => 'Deposit simulation failed.',
|
|
'expire_success' => 'The virtual account deposit deadline has been expired.',
|
|
'recheck_success' => 'Deposit status has been rechecked.',
|
|
'not_test_mode' => 'This is available in test mode only.',
|
|
'not_waiting_deposit' => 'Only payments awaiting deposit can be processed.',
|
|
'not_expirable' => 'This payment cannot be expired.',
|
|
'not_cvs' => 'This is not a convenience store or virtual account payment.',
|
|
],
|
|
];
|