10.April 2026
This commit is contained in:
parent
a00c42e770
commit
f58c709945
208 changed files with 19280 additions and 2914 deletions
|
|
@ -1,29 +1,61 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="card mt-5">
|
||||
<h5 class="card-header py-4 px-5">Sys Admin Tools</h5>
|
||||
<h5 class="card-header py-4 px-5">
|
||||
@if (Auth::user()->isSuperAdmin())
|
||||
Super
|
||||
@else
|
||||
Sys
|
||||
@endif
|
||||
Admin Tools
|
||||
</h5>
|
||||
<div class="row no-gutters row-bordered">
|
||||
<div class="col-md-12 p-5">
|
||||
<a href="{{ route('sysadmin_tool', ['buyings_products']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Add Buyings Products from Order</a>
|
||||
<a href="{{ route('sysadmin_tool', ['business_structur']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Business Strukrur speichern</a>
|
||||
<a href="{{ route('sysadmin_tool', ['sales_members']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Buchnungen Pakete Berater nach Jahren</a>
|
||||
<a href="{{ route('sysadmin_tool', ['customers']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Kundenhoheit prüfen</a>
|
||||
<a href="{{ route('sysadmin_tool', ['cronjobs']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Cron Jobs</a>
|
||||
<a href="{{ route('sysadmin_tool', ['domainssl']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Subdomains prüfen SSL/Aktiv</a>
|
||||
<a href="{{ route('sysadmin_tool', ['shopping_orders']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Shopping Orders Käufe</a>
|
||||
<a href="{{ route('sysadmin_tool', ['import']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Import</a>
|
||||
<a href="{{ route('sysadmin_tool', ['corrections']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Corrections Points / Payment / Price / Tax / Tax Spit / Points / Discount </a>
|
||||
<a href="{{ route('sysadmin_tool', ['change_user_businesses']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Change user level qual_pp in UserBusiness </a>
|
||||
<a href="{{ route('sysadmin_tool', ['repair_sales_volume_invoice']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Repair Sales Volume save InvoiceID </a>
|
||||
<a href="{{ route('sysadmin_tool', ['user_credit_items_change_message']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> User Credit items Change Message </a>
|
||||
<a href="{{ route('sysadmin_tool', ['clean_html_product_description']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> clean_html_product_description </a>
|
||||
<a href="{{ route('sysadmin_tool', ['user_credit_items_add_from']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> user_credit_items add from month year </a>
|
||||
<a href="{{ route('sysadmin_tool', ['import_dbip_country_lite']) }}" class="d-block mb-3"><i class="ion ion-ios-arrow-forward"></i> Import dbip-country-lite </a>
|
||||
<div class="col-md-12 p-5">
|
||||
@if (Auth::user()->isSysAdmin())
|
||||
<a href="{{ route('sysadmin_tool', ['buyings_products']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Add Buyings Products from Order</a>
|
||||
<a href="{{ route('sysadmin_tool', ['business_structur']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Business Strukrur speichern</a>
|
||||
<a href="{{ route('sysadmin_tool', ['sales_members']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Buchnungen Pakete Berater nach Jahren</a>
|
||||
<a href="{{ route('sysadmin_tool', ['customers']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Kundenhoheit prüfen</a>
|
||||
<a href="{{ route('sysadmin_tool', ['cronjobs']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Cron Jobs</a>
|
||||
<a href="{{ route('sysadmin_tool', ['domainssl']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Subdomains prüfen SSL/Aktiv</a>
|
||||
<a href="{{ route('sysadmin_tool', ['shopping_orders']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Shopping Orders Käufe</a>
|
||||
<a href="{{ route('sysadmin_tool', ['import']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Import</a>
|
||||
<a href="{{ route('sysadmin_tool', ['corrections']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Corrections Points / Payment / Price / Tax / Tax
|
||||
Spit /
|
||||
Points / Discount </a>
|
||||
<a href="{{ route('sysadmin_tool', ['change_user_businesses']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Change user level qual_pp in UserBusiness </a>
|
||||
<a href="{{ route('sysadmin_tool', ['repair_sales_volume_invoice']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Repair Sales Volume save InvoiceID </a>
|
||||
<a href="{{ route('sysadmin_tool', ['user_credit_items_change_message']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> User Credit items Change Message </a>
|
||||
<a href="{{ route('sysadmin_tool', ['clean_html_product_description']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> clean_html_product_description </a>
|
||||
<a href="{{ route('sysadmin_tool', ['user_credit_items_add_from']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> user_credit_items add from month year </a>
|
||||
<a href="{{ route('sysadmin_tool', ['import_dbip_country_lite']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> Import dbip-country-lite </a>
|
||||
<a href="{{ route('sysadmin_tool', ['payone_callback_testbench']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> <strong>Payone-Callback Testbench</strong>
|
||||
({{ parse_url(route('api.payment_status', [], true), PHP_URL_HOST) }}/payment/status) </a>
|
||||
@endif
|
||||
@if (Auth::user()->isSuperAdmin())
|
||||
<a href="{{ route('sysadmin_tool', ['abo_orders_overview']) }}" class="d-block mb-3"><i
|
||||
class="ion ion-ios-arrow-forward"></i> <strong class="text-danger">Abo-Bestellungen
|
||||
Zahlungsdifferenzen</strong> </a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
135
resources/views/sys/tools/abo-orders-overview.blade.php
Normal file
135
resources/views/sys/tools/abo-orders-overview.blade.php
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold mb-4">
|
||||
Abo-Bestellungen – Soll-Brutto vs. tatsächlich eingezogen (ShoppingPayment)
|
||||
</h4>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<div class="btn-group mb-3" role="group">
|
||||
<a href="{{ route('sysadmin_tool', ['abo_orders_overview']) }}"
|
||||
class="btn btn-{{ $filter === 'all' ? 'primary' : 'outline-primary' }}">Alle</a>
|
||||
<a href="{{ route('sysadmin_tool', ['abo_orders_overview']) }}?filter=berater"
|
||||
class="btn btn-{{ $filter === 'berater' ? 'warning' : 'outline-warning' }}">Berater</a>
|
||||
<a href="{{ route('sysadmin_tool', ['abo_orders_overview']) }}?filter=kunde"
|
||||
class="btn btn-{{ $filter === 'kunde' ? 'info' : 'outline-info' }}">Kunden</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="alert alert-info mb-0">
|
||||
<strong>Gesamt Bestellungen:</strong> {{ $summary['total_orders'] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="alert alert-{{ $summary['affected_orders'] > 0 ? 'danger' : 'success' }} mb-0">
|
||||
<strong>Betroffene Bestellungen:</strong> {{ $summary['affected_orders'] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="alert alert-{{ $summary['total_diff'] != 0 ? 'danger' : 'success' }} mb-0">
|
||||
<strong>Fehlbetrag gesamt:</strong> {{ number_format($summary['total_diff'], 2, ',', '.') }} €
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="alert alert-warning mb-0">
|
||||
<strong>Hinweis:</strong> Eingezogen = Summe <code>shopping_payments.amount</code> bei TX
|
||||
paid / extern_paid / invoice_paid. Soll = <code>total_shipping</code> (Brutto).
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-sm">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Abo-Order ID</th>
|
||||
<th>Abo ID</th>
|
||||
<th>Order ID</th>
|
||||
<th>User</th>
|
||||
<th>Typ</th>
|
||||
<th class="text-right">Netto+Versand (subtotal_ws)</th>
|
||||
<th class="text-right">MwSt</th>
|
||||
<th class="text-right">Soll Brutto (total_shipping)</th>
|
||||
<th class="text-right">Eingezogen (Zahlung)</th>
|
||||
<th>Zahlungs-TX</th>
|
||||
<th class="text-right text-danger">Differenz (Soll − Ist)</th>
|
||||
<th>Status</th>
|
||||
<th>Bezahlt</th>
|
||||
<th>TX-Action</th>
|
||||
<th>Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rows as $row)
|
||||
<tr class="{{ isset($row['diff']) && $row['diff'] != 0 ? 'table-danger' : '' }}">
|
||||
<td>{{ $row['abo_order_id'] }}</td>
|
||||
<td>{{ $row['abo_id'] }}</td>
|
||||
<td>{!! $row['order_id'] !!}</td>
|
||||
<td>
|
||||
<small>
|
||||
@if ($row['user_id'])
|
||||
<strong>#{{ $row['user_id'] }}</strong>
|
||||
@endif
|
||||
{{ $row['user_name'] }}<br>
|
||||
{{ $row['user_email'] }}
|
||||
</small>
|
||||
</td>
|
||||
<td>
|
||||
@if ($row['is_for'] === 'me')
|
||||
<span class="badge badge-outline-warning-dark">Berater</span>
|
||||
@else
|
||||
<span class="badge badge-outline-info">Kunde</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">{{ number_format($row['subtotal_ws'], 2, ',', '.') }} €</td>
|
||||
<td class="text-right">{{ number_format($row['tax'], 2, ',', '.') }} €</td>
|
||||
<td class="text-right">{{ number_format($row['total_shipping'], 2, ',', '.') }} €</td>
|
||||
<td class="text-right">
|
||||
@if ($row['actual_charged_eur'] !== null)
|
||||
{{ number_format($row['actual_charged_eur'], 2, ',', '.') }} €
|
||||
@else
|
||||
<span class="text-muted"
|
||||
title="Keine Zahlung mit Status paid/extern_paid/invoice_paid">–</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<small>{{ $row['payment_txactions'] ?: '–' }}</small>
|
||||
@if (($row['payment_count'] ?? 0) > 1)
|
||||
<span class="badge badge-secondary"
|
||||
title="Anzahl Zahlungszeilen">{{ $row['payment_count'] }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
@if ($row['diff'] === null)
|
||||
<span class="text-muted">–</span>
|
||||
@elseif($row['diff'] != 0)
|
||||
<strong class="text-danger">{{ number_format($row['diff'], 2, ',', '.') }}
|
||||
€</strong>
|
||||
@else
|
||||
<span class="text-success">0,00 €</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{!! $row['status_badge'] ?? '<span class="badge badge-pill badge-secondary">' . $row['status'] . '</span>' !!}</td>
|
||||
<td>
|
||||
@if ($row['paid'])
|
||||
<span class="badge badge-success">Ja</span>
|
||||
@else
|
||||
<span class="badge badge-danger">Nein</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $row['txaction'] }}</td>
|
||||
<td><small>{{ $row['created_at'] ? $row['created_at']->format('d.m.Y H:i') : '-' }}</small>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
268
resources/views/sys/tools/payone-callback-testbench.blade.php
Normal file
268
resources/views/sys/tools/payone-callback-testbench.blade.php
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold mb-3">
|
||||
Payone-Callback Testbench
|
||||
</h4>
|
||||
|
||||
<p class="text-muted mb-4">
|
||||
<strong>Erstbestellung Abo (realistisch):</strong> Zuerst legt der Checkout das Abo an
|
||||
(<code>CheckoutController</code> → <code>AboHelper::createNewAbo</code>), danach meldet Payone per
|
||||
<code>POST {{ route('api.payment_status', [], true) }}</code> den Zahlungsstatus – dann laufen u. a.
|
||||
<code>Payment::paymentStatusPaidAction</code>, Abo-Freischaltung (<code>setAboActive</code>) und
|
||||
<code>IncentiveTracker::trackAboActivated</code>. Die Testbench-Schritte sind in dieser Reihenfolge angeordnet.
|
||||
Nur außerhalb Production.
|
||||
</p>
|
||||
|
||||
@if (session('error'))
|
||||
<div class="alert alert-danger">{{ session('error') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="card mb-4">
|
||||
<div class="card-header font-weight-bold">1. Test-Bestellung anlegen</div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="{{ route('sysadmin_tool_store', ['payone_callback_testbench']) }}">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="create_fixture">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">Betrag (Brutto EUR)</label>
|
||||
<div class="col-md-4">
|
||||
<input type="number" name="amount_eur" class="form-control" step="0.01" min="0.01"
|
||||
value="{{ old('amount_eur', '119.00') }}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-3 col-form-label">Berater (users.id)</label>
|
||||
<div class="col-md-4">
|
||||
<input type="number" name="consultant_user_id" class="form-control" min="1"
|
||||
value="{{ old('consultant_user_id', '454') }}" required>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<small class="form-text text-muted">
|
||||
Bei <code>is_for = me</code> wird <code>auth_user_id</code> gesetzt; bei <code>ot</code> bleibt
|
||||
<code>auth_user_id</code> leer und <code>member_id</code> wird auf diese Berater-ID gesetzt.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="is_abo" id="is_abo" class="form-check-input" value="1"
|
||||
{{ old('is_abo') ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="is_abo">Als Abo-Bestellung (<code>is_abo</code>)</label>
|
||||
</div>
|
||||
<div class="form-check mt-2">
|
||||
<input type="checkbox" name="is_for_ot" id="is_for_ot" class="form-check-input" value="1"
|
||||
{{ old('is_for_ot', true) ? 'checked' : '' }}>
|
||||
<label class="form-check-label" for="is_for_ot">Kundenkontext <code>is_for = ot</code> (für
|
||||
Incentive <code>trackAboActivated</code>)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6 offset-md-3">
|
||||
<button type="submit" class="btn btn-primary">Bestellung + Zahlung anlegen</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!empty($fixture))
|
||||
<div class="card mb-4 border-success">
|
||||
<div class="card-header font-weight-bold text-success">Angelegte Testdaten</div>
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3">shopping_order_id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $fixture['shopping_order_id'] }}</code></dd>
|
||||
<dt class="col-sm-3">shopping_payment_id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $fixture['shopping_payment_id'] }}</code></dd>
|
||||
<dt class="col-sm-3">reference (16)</dt>
|
||||
<dd class="col-sm-9"><code>{{ $fixture['reference'] }}</code></dd>
|
||||
<dt class="col-sm-3">amount (Cent)</dt>
|
||||
<dd class="col-sm-9"><code>{{ $fixture['amount_cents'] }}</code> (=
|
||||
{{ number_format($fixture['amount_eur'], 2, ',', '.') }} €)</dd>
|
||||
<dt class="col-sm-3">Berater-ID</dt>
|
||||
<dd class="col-sm-9"><code>{{ $fixture['consultant_user_id'] ?? '–' }}</code></dd>
|
||||
<dt class="col-sm-3">Zuordnung</dt>
|
||||
<dd class="col-sm-9"><small>{{ $fixture['assignment_note'] ?? '' }}</small></dd>
|
||||
<dt class="col-sm-3">API-URL</dt>
|
||||
<dd class="col-sm-9"><small class="text-break">{{ $fixture['api_url'] }}</small></dd>
|
||||
</dl>
|
||||
|
||||
<hr>
|
||||
<p class="mb-2 font-weight-bold">2. Checkout-Erfolg (nur Abo)</p>
|
||||
<p class="small text-muted mb-2">
|
||||
Wie <code>handleSuccessfulTransaction</code> / <code>transactionApproved</code>:
|
||||
<code>AboHelper::createNewAbo($ShoppingPayment)</code> – legt UserAbo + UserAboOrder an.
|
||||
Ohne vorherige <code>payment_transactions</code> wird eine Minimal-Transaktion angelegt.
|
||||
</p>
|
||||
@if (!empty($fixture['is_abo']))
|
||||
<form method="post" action="{{ route('sysadmin_tool_store', ['payone_callback_testbench']) }}"
|
||||
class="d-inline">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="simulate_checkout_success">
|
||||
<input type="hidden" name="shopping_order_id" value="{{ $fixture['shopping_order_id'] }}">
|
||||
<button type="submit" class="btn btn-success">Abo anlegen (<code>createNewAbo</code>)</button>
|
||||
</form>
|
||||
@else
|
||||
<p class="small text-muted mb-0">Nicht-Abo – Schritt entfällt.</p>
|
||||
@endif
|
||||
|
||||
<hr>
|
||||
<p class="mb-2 font-weight-bold">3. Payone-API: Zahlung bestätigt (<code>paid</code>)</p>
|
||||
<p class="small text-muted mb-2">
|
||||
<code>Api\PayoneController::paymentStatus</code> → <code>Payment::paymentStatusPaidAction</code>
|
||||
(Abo freischalten, Incentive, …). Bei Abo-Erstbestellung nur nach Schritt 2 (sonst Fehlermeldung).
|
||||
</p>
|
||||
<form method="post" action="{{ route('sysadmin_tool_store', ['payone_callback_testbench']) }}"
|
||||
class="d-inline mr-2">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="simulate_paid">
|
||||
<input type="hidden" name="shopping_order_id" value="{{ $fixture['shopping_order_id'] }}">
|
||||
<button type="submit" class="btn btn-warning">Simulate <code>txaction=paid</code> (Erstbestellung)</button>
|
||||
</form>
|
||||
<form method="post" action="{{ route('sysadmin_tool_store', ['payone_callback_testbench']) }}"
|
||||
class="d-inline">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="clear_fixture">
|
||||
<button type="submit" class="btn btn-outline-secondary btn-sm">Session-Daten löschen</button>
|
||||
</form>
|
||||
|
||||
@php
|
||||
$benchUserAboId = $userAboId ?? ($checkoutSuccess['user_abo_id'] ?? null);
|
||||
@endphp
|
||||
@if (!empty($fixture['is_abo']) && $benchUserAboId)
|
||||
<hr>
|
||||
<p class="mb-2 font-weight-bold">4. Abo-Verlängerung (wie <code>user:make_abo_order</code> / Cron)</p>
|
||||
<p class="small text-muted mb-2">
|
||||
Setzt <code>next_date</code> auf heute, entfernt ggf. heutige <code>user_abo_orders</code> (Test-Wiederholung),
|
||||
führt dann <code>UserMakeAboOrder::makeOrder</code> aus (neue Bestellung + Payone). Anschließend Incentive-Zähler
|
||||
(z. B. qualifizierte Abos) und Umsatzpunkte prüfen – für Rechnung/SV wie in Produktion Schritt 5.
|
||||
</p>
|
||||
<form method="post" action="{{ route('sysadmin_tool_store', ['payone_callback_testbench']) }}"
|
||||
class="mb-3">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="simulate_cron_renewal">
|
||||
<div class="form-group row align-items-center">
|
||||
<label class="col-md-3 col-form-label"><code>user_abos.id</code></label>
|
||||
<div class="col-md-4">
|
||||
<input type="number" name="user_abo_id" class="form-control" min="1"
|
||||
value="{{ old('user_abo_id', $benchUserAboId) }}">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<small class="form-text text-muted mb-0">Standard aus Session nach Schritt 2/3; anpassbar.</small>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-outline-primary">Cron-Verlängerung ausführen</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
@if (!empty($cronRenewalOrderId))
|
||||
<hr>
|
||||
<p class="mb-2 font-weight-bold">5. Payone-API: Verlängerung bestätigt (<code>paid</code>)</p>
|
||||
<p class="small text-muted mb-2">
|
||||
Wie Server-zu-Server-Callback nach Cron-Zahlung: <code>Payment::paymentStatusPaidAction</code> (Rechnung,
|
||||
<code>createAndSalesVolume</code> → <code>IncentiveTracker::trackSalesVolume</code>, …).
|
||||
</p>
|
||||
<form method="post" action="{{ route('sysadmin_tool_store', ['payone_callback_testbench']) }}"
|
||||
class="d-inline">
|
||||
@csrf
|
||||
<input type="hidden" name="action" value="simulate_paid">
|
||||
<input type="hidden" name="shopping_order_id" value="{{ $cronRenewalOrderId }}">
|
||||
<button type="submit" class="btn btn-warning">Simulate <code>txaction=paid</code> (Verlängerung)</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<hr>
|
||||
<p class="mb-2 font-weight-bold">Manuell (z. B. Postman / curl)</p>
|
||||
<pre class="bg-light p-3 small text-break mb-0" style="white-space: pre-wrap;">{{ $fixture['curl'] }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!empty($simulateResult))
|
||||
<div class="card mb-4 border-info">
|
||||
<div class="card-header font-weight-bold">Ergebnis Schritt 3 (Payone-API)</div>
|
||||
<div class="card-body">
|
||||
@if (!empty($simulateResult['hint']))
|
||||
<p class="small text-muted mb-3">{{ $simulateResult['hint'] }}</p>
|
||||
@endif
|
||||
<dl class="row">
|
||||
<dt class="col-sm-3">HTTP (Kernel)</dt>
|
||||
<dd class="col-sm-9"><code>{{ $simulateResult['http_status'] }}</code></dd>
|
||||
<dt class="col-sm-3">Body</dt>
|
||||
<dd class="col-sm-9"><code>{{ $simulateResult['body'] }}</code> <span class="text-muted">(Payone
|
||||
erwartet TSOK)</span></dd>
|
||||
<dt class="col-sm-3">Order paid</dt>
|
||||
<dd class="col-sm-9">{{ $simulateResult['order_paid'] ? 'true' : 'false' }}</dd>
|
||||
<dt class="col-sm-3">Order txaction</dt>
|
||||
<dd class="col-sm-9"><code>{{ $simulateResult['order_txaction'] ?? 'null' }}</code></dd>
|
||||
</dl>
|
||||
<p class="mb-1 font-weight-bold">Gesendeter Payload</p>
|
||||
<pre class="bg-light p-3 small mb-0">{{ json_encode($simulateResult['payload'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!empty($checkoutSuccess))
|
||||
<div class="card mb-4 border-success">
|
||||
<div class="card-header font-weight-bold text-success">Ergebnis Schritt 2 (Checkout / createNewAbo)</div>
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3">user_abo_id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $checkoutSuccess['user_abo_id'] ?? '–' }}</code></dd>
|
||||
<dt class="col-sm-3">user_abo_orders.id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $checkoutSuccess['user_abo_order_id'] ?? '–' }}</code></dd>
|
||||
<dt class="col-sm-3">shopping_order_id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $checkoutSuccess['shopping_order_id'] ?? '–' }}</code></dd>
|
||||
<dt class="col-sm-3">Order paid (nachher)</dt>
|
||||
<dd class="col-sm-9">{{ !empty($checkoutSuccess['order_paid_after']) ? 'true' : 'false' }}</dd>
|
||||
</dl>
|
||||
@if (!empty($checkoutSuccess['hint']))
|
||||
<p class="small text-muted mb-0 mt-2">{{ $checkoutSuccess['hint'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (!empty($cronRenewal))
|
||||
<div class="card mb-4 border-primary">
|
||||
<div class="card-header font-weight-bold text-primary">Ergebnis Schritt 4 (Cron-Verlängerung)</div>
|
||||
<div class="card-body">
|
||||
<dl class="row mb-0">
|
||||
<dt class="col-sm-3">Erfolg</dt>
|
||||
<dd class="col-sm-9">{{ !empty($cronRenewal['success']) ? 'true' : 'false' }}</dd>
|
||||
@if (!empty($cronRenewal['shopping_order_id']))
|
||||
<dt class="col-sm-3">Neue shopping_order_id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $cronRenewal['shopping_order_id'] }}</code></dd>
|
||||
@endif
|
||||
@if (!empty($cronRenewal['user_abo_id']))
|
||||
<dt class="col-sm-3">user_abo_id</dt>
|
||||
<dd class="col-sm-9"><code>{{ $cronRenewal['user_abo_id'] }}</code></dd>
|
||||
@endif
|
||||
@if (!empty($cronRenewal['message']))
|
||||
<dt class="col-sm-3">Hinweis</dt>
|
||||
<dd class="col-sm-9">{{ $cronRenewal['message'] }}</dd>
|
||||
@endif
|
||||
@if (!empty($cronRenewal['diagnosis']))
|
||||
<dt class="col-sm-3">Diagnose</dt>
|
||||
<dd class="col-sm-9">
|
||||
<pre class="bg-light p-2 small mb-0 text-break"
|
||||
style="white-space: pre-wrap;">{{ json_encode($cronRenewal['diagnosis'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
|
||||
</dd>
|
||||
@endif
|
||||
</dl>
|
||||
@if (!empty($cronRenewal['hint']))
|
||||
<p class="small text-muted mb-0 mt-2">{{ $cronRenewal['hint'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
Loading…
Add table
Add a link
Reference in a new issue