api.so-manager-dev.com/routes/api.php
Your Name 41814dd908
All checks were successful
Deploy api / deploy (push) Successful in 23s
SHJ-4 SHJ-5 SHJ-6 変更点実装
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 19:25:40 +09:00

83 lines
3.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\UserInformationHistoryController;
use App\Http\Controllers\Api\CreditPaymentController;
use App\Http\Controllers\Api\RemPaymentController;
use App\Http\Controllers\Api\PaymentCallbackController;
use App\Http\Controllers\Api\PaymentStatusController;
use App\Http\Controllers\Api\PaymentUpdateController;
use App\Http\Controllers\Api\RefundController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| API Key認証が必要なAPIルート
| Header: X-API-Key
|
| 認証仕様の詳細は api.doc/api_authentication.md を参照
|
*/
Route::middleware(['api.key'])->group(function () {
/*
|--------------------------------------------------------------------------
| API 7, 8, 9 - ユーザーインフォメーション履歴
|--------------------------------------------------------------------------
|
| GET /api/user-information-history - 一覧取得
| GET /api/user-information-history/{id} - 単一取得
| POST /api/user-information-history - 新規追加
| PUT /api/user-information-history/{id} - 更新
|
*/
Route::get('user-information-history', [UserInformationHistoryController::class, 'index']);
Route::get('user-information-history/{id}', [UserInformationHistoryController::class, 'show'])
->where('id', '[0-9]+');
Route::post('user-information-history', [UserInformationHistoryController::class, 'store']);
Route::put('user-information-history/{id}', [UserInformationHistoryController::class, 'update'])
->where('id', '[0-9]+');
/*
|--------------------------------------------------------------------------
| API 1, 2, 4, 5, 6 - 決済APIAPI Key認証あり
|--------------------------------------------------------------------------
|
| POST /api/newwipe/credit/link - クレジット支払リンク生成
| POST /api/newwipe/credit/subscription/charge - 継続課金請求
| POST /api/newwipe/rem/link - REM支払案内リンク生成
| GET /api/newwipe/status - 決済ステータス取得
| PUT /api/newwipe/update - 決済情報更新
| POST /api/newwipe/refund - 返金
|
*/
Route::prefix('newwipe')->group(function () {
Route::post('credit/link', [CreditPaymentController::class, 'createLink']);
Route::post('credit/subscription/charge', [CreditPaymentController::class, 'chargeSubscription']);
Route::post('rem/link', [RemPaymentController::class, 'createLink']);
Route::get('status', [PaymentStatusController::class, 'show']);
Route::match(['put', 'post'], 'update', [PaymentUpdateController::class, 'update']);
Route::post('refund', [RefundController::class, 'refund']);
});
});
/*
|--------------------------------------------------------------------------
| API 3 - 決済結果通知Callback
|--------------------------------------------------------------------------
|
| POST /api/newwipe/callback - Wellnet入金通知受信
| POST /api/newwipe/callback/shj4a - SHJ-4A ウェルネット収納情報受付
|
| 認証: IP白名単のみAPI Key不要
|
*/
Route::middleware(['wellnet.ip'])->group(function () {
Route::match(['get', 'post'], 'newwipe/callback', [PaymentCallbackController::class, 'receive']);
Route::match(['get', 'post'], 'newwipe/callback/shj4a', [PaymentCallbackController::class, 'receiveShj4a']);
});