feat(payment): implement OxaPay provider and non-recurring subscription sync
- Add comprehensive OxaPay payment provider with invoice creation, webhook processing, and subscription status sync - Implement conditional payload fields (to_currency, callback_url) based on configuration - Create universal sync command for all non-recurring payment providers - Add subscription model fields for payment tracking - Implement proper status mapping between OxaPay and Laravel subscription states - Add webhook signature validation using HMAC SHA512
This commit is contained in:
@@ -2,27 +2,6 @@
|
||||
|
||||
use App\Http\Controllers\AppController;
|
||||
|
||||
// DEBUG: Test route to check PolarProvider
|
||||
Route::get('/debug-polar', function () {
|
||||
try {
|
||||
$provider = new \App\Services\Payments\Providers\PolarProvider;
|
||||
|
||||
return response()->json([
|
||||
'status' => 'success',
|
||||
'provider_class' => get_class($provider),
|
||||
'is_active' => $provider->isActive(),
|
||||
'config' => $provider->getConfiguration(),
|
||||
'sandbox' => $provider->config['sandbox'] ?? 'unknown',
|
||||
'timestamp' => '2025-12-04-17-15-00',
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'status' => 'error',
|
||||
'message' => $e->getMessage(),
|
||||
'trace' => $e->getTraceAsString(),
|
||||
]);
|
||||
}
|
||||
});
|
||||
use App\Http\Controllers\ImpersonationController;
|
||||
use App\Http\Controllers\WebhookController;
|
||||
use App\Http\Middleware\CheckPageSlug;
|
||||
@@ -180,7 +159,7 @@ Route::middleware(['auth'])->group(function (): void {
|
||||
Route::get('settings/appearance', Appearance::class)->name('settings.appearance');
|
||||
});
|
||||
|
||||
Route::post('/webhook/oxapay', [WebhookController::class, 'oxapay'])->name('webhook.oxapay');
|
||||
Route::post('/webhook/oxapayLegacy', [WebhookController::class, 'oxapay'])->name('webhook.oxapayLegacy');
|
||||
|
||||
// Unified Payment System Routes
|
||||
require __DIR__.'/payment.php';
|
||||
|
||||
Reference in New Issue
Block a user