Skip to content

Commit 2f57bdb

Browse files
authored
Merge pull request #1145 from itflow-org/stripe-account-ui
Stripe payments - Account selection
2 parents 3c69761 + d32e3a6 commit 2f57bdb

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ All notable changes to ITFlow will be documented in this file.
66
- Moved cron/cli scripts to scripts subfolder - Old scripts remain in the root for now, but please update your cron configurations!
77
- Bugfix: Ticket edit modal not showing multi-client/no-client projects
88
- Bugfix: Asset interface losing DHCP setting
9-
- Bugfix: Editing / creating recurring expensives results in error 500 due to incorrect var name
9+
- Bugfix: Editing / creating recurring expenses results in error 500 due to incorrect var name
10+
- Stripe online payment setup now prompts you to set the income/expense account
1011

1112
## 24.12
1213

admin_settings_online_payment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="<?php if ($config_stripe_enable == 0) { echo "d-none"; } ?>">
2626

2727
<div class="form-group">
28-
<label>Publishable key</label>
28+
<label>Publishable key <strong class="text-danger">*</strong></label>
2929
<div class="input-group">
3030
<div class="input-group-prepend">
3131
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
@@ -35,7 +35,7 @@
3535
</div>
3636

3737
<div class="form-group">
38-
<label>Secret key</label>
38+
<label>Secret key <strong class="text-danger">*</strong></label>
3939
<div class="input-group">
4040
<div class="input-group-prepend">
4141
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
@@ -45,7 +45,7 @@
4545
</div>
4646

4747
<div class="form-group">
48-
<label>Expense / Income Account</label>
48+
<label>Account <strong class="text-danger">*</strong></label>
4949
<div class="input-group">
5050
<div class="input-group-prepend">
5151
<span class="input-group-text"><i class="fas fa-fw fa-piggy-bank"></i></span>

post/admin/admin_settings_online_payment.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@
1818
// Logging
1919
logAction("Settings", "Edit", "$session_name edited online payment settings");
2020

21-
$_SESSION['alert_message'] = "Online Payment Settings updated";
21+
22+
if ($config_stripe_account == 0) {
23+
$_SESSION['alert_type'] = "error";
24+
$_SESSION['alert_message'] = "Stripe payment account must be specified!";
25+
} else {
26+
$_SESSION['alert_message'] = "Online Payment Settings updated";
27+
}
2228

2329
header("Location: " . $_SERVER["HTTP_REFERER"]);
2430
}

0 commit comments

Comments
 (0)