Commit Graph

19 Commits

Author SHA1 Message Date
myron 602bc77cdd Fix CyberMail from field — use separate from/from_name fields (API rejects Name <email> format) 2026-06-14 15:40:35 +00:00
myron 66cbd3f0d3 Remove prefilled placeholder email from admin login 2026-06-14 15:18:27 +00:00
myron 8957cb2c28 Remove equipment link from footer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 12:53:53 +00:00
myron 2a1ca85062 Add FAQ, shipping, returns, track order, and privacy policy pages
- faq.php: accordion FAQ with Orders, Coffee & Products, Coffee Freshness & Storage, and Account sections
- shipping.php: rates table (3-5 days after processing), processing time, delivery flow
- returns.php: three-tier policy (your/our/shared responsibility) adapted from DripShipper
- track-order.php: order lookup by order number + email, progress steps, tracking link
- privacy.php: full privacy policy adapted for Toms Java Jive
- footer.php: added Privacy Policy link to Support section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 12:52:25 +00:00
myron 62dd05780a Add payment_status guard to payment_intent.succeeded handler
Mirrors the checkout.session.completed case which checks
payment_status === paid before acting. Now checks data.status
=== succeeded on the PaymentIntent object, consistent with how
Stripe structures the event and defensive against any future
edge case where the event fires in a non-final state.
2026-06-03 06:13:22 +00:00
myron 7eddf9e85d Fix remaining code review findings: email transport errors, metadata payload, from-name, pagination
- Email::send(): add curl_error() check so transport failures (timeout,
  DNS, TLS) return a diagnosable error string instead of Unknown error
- Email::send(): strip metadata key from options before array_merge so
  non-API fields are never sent to CyberMail endpoint
- Email::send() + sendEmail(): include from-name in From field using
  RFC 5322 "Name <email>" format so fromName DB setting takes effect
- email-log.php: replace unbounded page-link loop with a windowed
  paginator (first/last 2 pages + ±2 around current) with ellipsis
  gaps — prevents hundreds of anchors rendering at scale
2026-06-03 06:01:44 +00:00
myron a5b91ca0ea Fix Email class ignoring DB from-address settings
Constructor now reads cybermail_from_email and cybermail_from_name from
the settings table via getSetting(), falling back to constants. Matches
the pattern already used for cybermail_api_key and the global sendEmail()
wrapper in functions.php. Admin integrations page changes now take effect
across all email paths.
2026-06-03 03:44:10 +00:00
myron f8e9746340 Route webhook order emails through Email class for email_log visibility
Replaced local sendOrderConfirmationEmail() with emailService()->sendOrderConfirmation().
Order confirmations now log to email_log table and use the branded template
(orange header, full subtotal/tax/discount breakdown) instead of the minimal
brown-header version that was invisible to the admin Email Log.
2026-06-03 03:42:50 +00:00
myron 2550ec5695 Fix duplicate order confirmation email on Stripe Checkout
When using Stripe Checkout, both checkout.session.completed and
payment_intent.succeeded fire for the same payment. After the stripe.php
change propagated order_id into PI metadata, the PI handler also found
an order_id and sent a second confirmation email.

Fix: fetch the order first in payment_intent.succeeded and skip if
already confirmed. Also records stripe_payment_intent in this path
for direct PI flows that bypass checkout.session.completed.
2026-06-03 03:41:30 +00:00
myron 4f096047b6 Fix CyberMail payload format: use flat string for from/to fields 2026-05-29 18:58:35 +00:00
myron 76bf967bd0 Switch email to CyberMail API; integrations page manages API key via DB 2026-05-29 18:49:15 +00:00
myron 6b71828199 Fix integrations.php: handle POST before HTML output to fix blank screen on save 2026-05-29 18:31:16 +00:00
myron e39df89a95 Fix webhook: add checkout.session.completed; propagate metadata to payment intent 2026-05-29 16:32:37 +00:00
myron 0d481f8feb Simplify admin login to email/password only; remove Google OAuth 2026-05-29 15:33:16 +00:00
myron e344e52d70 Add Google OAuth admin login; fix header comment; both auth methods active 2026-05-29 15:13:38 +00:00
myron 53f9f3e4da Replace all SendGrid references with CyberMail in admin UI 2026-05-29 15:06:43 +00:00
myron 25e96a3d5f Switch sendEmail() in functions.php to CyberMail API 2026-05-29 15:02:17 +00:00
myron d30851e3ec Add DB schema (45 tables) and vhost config 2026-05-25 13:51:25 +00:00
myron 996ca0d621 Initial commit 2026-05-22 12:52:44 +00:00