Compare commits
2 Commits
014da27f66
...
c0dd8f269a
| Author | SHA1 | Date | |
|---|---|---|---|
| c0dd8f269a | |||
| b3ed503742 |
@@ -40,7 +40,7 @@ trait NovaSberPaymentOrderItemAuth
|
||||
/** Delete button */
|
||||
public function authorizedToDelete(Request $request)
|
||||
{
|
||||
return false;
|
||||
return auth()->user()->isMe();
|
||||
}
|
||||
|
||||
/** Force delete */
|
||||
|
||||
@@ -58,11 +58,21 @@ class SyncWithSystem extends Action
|
||||
pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y')
|
||||
);
|
||||
|
||||
info($systemResponse);
|
||||
$success = $systemResponse['errCode'] == 0;
|
||||
|
||||
if ($success) {
|
||||
$orderItem->update([
|
||||
'synced_with_system' => true,
|
||||
]);
|
||||
} else {
|
||||
$orderItem->update([
|
||||
'synced_with_system' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
return Action::modal('modal-response', [
|
||||
'title' => 'SYSTEM API',
|
||||
'html' => "<>",
|
||||
'html' => $success ? "Success" : "Fail",
|
||||
'title' => $success ? "Success" : "Fail",
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user