diff --git a/modules/billing/admin.php b/modules/billing/admin.php index 7b6d4ab0..42b0bf1b 100644 --- a/modules/billing/admin.php +++ b/modules/billing/admin.php @@ -55,8 +55,6 @@ function h($s){ return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'); } Transaction Log Manage Coupons Edit Site Config - XML Config Editor - XML Config Guide
diff --git a/modules/billing/admin_coupons.php b/modules/billing/admin_coupons.php index e1d7678e..fb161aca 100644 --- a/modules/billing/admin_coupons.php +++ b/modules/billing/admin_coupons.php @@ -160,29 +160,120 @@ $coupons_result = mysqli_query($db, "SELECT * FROM {$table_prefix}billing_coupon @@ -643,11 +643,30 @@ $siteBase = $protocol . $host;

Checkout with PayPal

+ +
+ Checkout Unavailable: PayPal has not been configured for this site. + Please contact the site administrator or try again later. + 0 && $db) { + $ar = mysqli_query($db, "SELECT users_role FROM {$table_prefix}users WHERE user_id = " . $cart_user_id_check . " LIMIT 1"); + if ($ar && ($arow = mysqli_fetch_assoc($ar))) { + $cart_is_admin = strtolower($arow['users_role'] ?? '') === 'admin'; + } + } + if ($cart_is_admin): + ?> +
Admin: set $paypal_client_id in Site Config. + +
+

Click the button below to complete your purchase securely through PayPal.

-
- +
Continue Shopping My Account @@ -665,7 +684,7 @@ $siteBase = $protocol . $host; } - 0.00): ?> + 0.00 && !empty($client_id)): ?>