diff --git a/client/saved_payment_methods.php b/client/saved_payment_methods.php
index c1ace7d3..6fadc685 100644
--- a/client/saved_payment_methods.php
+++ b/client/saved_payment_methods.php
@@ -92,7 +92,7 @@ if (!$stripe_public_key || !$stripe_secret_key) {
You currently have no saved payment methods. Please add one below.
-
+
paymentMethods->retrieve($stripe_pm_id, []);
$brand = nullable_htmlentities($pm->card->brand);
@@ -107,8 +117,8 @@ if (!$stripe_public_key || !$stripe_secret_key) {
$exp_month = nullable_htmlentities($pm->card->exp_month);
$exp_year = nullable_htmlentities($pm->card->exp_year);
- echo "- $brand card ending in $last4, expires $exp_month/$exp_year";
- echo " – Remove
";
+ echo "- $brand x$last4 | Exp. $exp_month/$exp_year";
+ echo " – Remove
";
}
} catch (Exception $e) {
$error = $e->getMessage();
diff --git a/client/unpaid_invoices.php b/client/unpaid_invoices.php
index 6a5650d5..9276600b 100644
--- a/client/unpaid_invoices.php
+++ b/client/unpaid_invoices.php
@@ -160,12 +160,22 @@ $balance = $invoice_amounts - $amount_paid;
while ($row = mysqli_fetch_array($sql_saved_payment_methods)) {
$saved_payment_id = intval($row['saved_payment_id']);
$saved_payment_description = nullable_htmlentities($row['saved_payment_description']);
+ $payment_icon = "fas fa-credit-card"; // default icon
+ if (strpos($saved_payment_description, "visa") !== false) {
+ $payment_icon = "fab fa-cc-visa";
+ } elseif (strpos($saved_payment_description, "mastercard") !== false) {
+ $payment_icon = "fab fa-cc-mastercard";
+ } elseif (strpos($saved_payment_description, "american express") !== false || strpos($saved_payment_description, "amex") !== false) {
+ $payment_icon = "fab fa-cc-amex";
+ } elseif (strpos($saved_payment_description, "discover") !== false) {
+ $payment_icon = "fab fa-cc-discover";
+ }
$payment_provider_name = nullable_htmlentities($row['payment_provider_name']);
?>
- = $saved_payment_description ?>
+ = $saved_payment_description ?>