10.April 2026
This commit is contained in:
parent
a00c42e770
commit
f58c709945
208 changed files with 19280 additions and 2914 deletions
|
|
@ -105,29 +105,39 @@ class PayoneController extends Controller
|
|||
echo 'TSOK';
|
||||
exit;
|
||||
}
|
||||
|
||||
/* TODO -- need this? */
|
||||
/*
|
||||
* Payone sendet dieselbe txaction oft mehrfach (v. a. "appointed"). War der Status
|
||||
* bereits auf ShoppingPayment gespeichert, ist das ein Duplikat: TSOK, keine Doppel-Verarbeitung.
|
||||
* Ausnahme: erneutes "paid", obwohl die Bestellung noch nicht als bezahlt gefuehrt wird (Recovery).
|
||||
*/
|
||||
if ($shopping_payment->txaction == $data['txaction']) {
|
||||
|
||||
if ($data['txaction'] === 'paid' && $shopping_order->txaction === 'paid') {
|
||||
MyLog::writeLog(
|
||||
'payone',
|
||||
'error',
|
||||
'Error:2007 App\Http\Controllers\Api\PayoneController::paymentStatus same txaction - was already paid',
|
||||
'notice',
|
||||
'App\Http\Controllers\Api\PayoneController::paymentStatus duplicate callback ignored (already paid)',
|
||||
$data,
|
||||
false
|
||||
);
|
||||
// was already paid
|
||||
echo 'TSOK';
|
||||
exit;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (in_array($data['txaction'], ['appointed', 'failed', 'pending'], true)) {
|
||||
MyLog::writeLog(
|
||||
'payone',
|
||||
'error',
|
||||
'Error:2007 App\Http\Controllers\Api\PayoneController::paymentStatus same txaction - show',
|
||||
$data,
|
||||
'info',
|
||||
'App\Http\Controllers\Api\PayoneController::paymentStatus duplicate callback ignored (same txaction)',
|
||||
[
|
||||
'reference' => $data['reference'] ?? null,
|
||||
'param' => $data['param'] ?? null,
|
||||
'txaction' => $data['txaction'],
|
||||
'txid' => $data['txid'] ?? null,
|
||||
],
|
||||
false
|
||||
);
|
||||
echo 'TSOK';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +201,6 @@ class PayoneController extends Controller
|
|||
$locked_order = ShoppingOrder::where('id', $shopping_order->id)
|
||||
->lockForUpdate()
|
||||
->first();
|
||||
|
||||
// Double-check if payment was already processed
|
||||
if (! $locked_order->paid) {
|
||||
$send_link = Payment::paymentStatusPaidAction($locked_order, true, $shopping_payment);
|
||||
|
|
@ -211,6 +220,7 @@ class PayoneController extends Controller
|
|||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$data['send_link'] = $send_link;
|
||||
if ($send_mail) {
|
||||
Payment::paymentStatusSendMail($shopping_order, $shopping_payment, $data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue