Release: Merge develop into master #17

Merged
mrouissi merged 18 commits from develop into master 2025-06-13 18:03:18 +02:00
Owner

This pull request merges all new features and fixes from the develop branch into master to prepare for a new release. This includes the full implementation of contract AG-2025/00211 and subsequent repository cleanup.

Key Features and Enhancements

1. Payment Processing & Reliability

  • Refactored card payment processing to properly verify Stripe payment status
  • Implemented comprehensive, server-side error handling and logging for payment failures
  • Enhanced the payment form with custom client-side validation and improved error message styling
  • Preserves session state to allow users to retry after a failed payment

2. Customer Data & Inquiry Handling

  • Added functionality to track client IP addresses for new inquiries
  • Extended the Payment entity to store customer details (name, email, address) retrieved from Stripe
  • Added a new customer data form to the payment template

3. Email Functionality

  • Implemented core email-sending functionality using SwiftMailer, configured via the .env file
  • Payment confirmation emails are now sent upon successful payment

4. Repository & Code Cleanup

  • The Sofortüberweisung payment option was removed
  • Added a .gitignore file to exclude cache and vendor directories
  • Removed previously tracked cache files from the repository's history

Contract Implementation

  • Full implementation of contract AG-2025/00211
  • All requirements satisfied and tested
This pull request merges all new features and fixes from the develop branch into master to prepare for a new release. This includes the full implementation of contract AG-2025/00211 and subsequent repository cleanup. ## Key Features and Enhancements ### 1. Payment Processing & Reliability - Refactored card payment processing to properly verify Stripe payment status - Implemented comprehensive, server-side error handling and logging for payment failures - Enhanced the payment form with custom client-side validation and improved error message styling - Preserves session state to allow users to retry after a failed payment ### 2. Customer Data & Inquiry Handling - Added functionality to track client IP addresses for new inquiries - Extended the Payment entity to store customer details (name, email, address) retrieved from Stripe - Added a new customer data form to the payment template ### 3. Email Functionality - Implemented core email-sending functionality using SwiftMailer, configured via the .env file - Payment confirmation emails are now sent upon successful payment ### 4. Repository & Code Cleanup - The _Sofortüberweisung_ payment option was removed - Added a .gitignore file to exclude cache and vendor directories - Removed previously tracked cache files from the repository's history ## Contract Implementation - ✅ Full implementation of contract AG-2025/00211 - ✅ All requirements satisfied and tested
- Implement SMTP email transport with Swift_SmtpTransport
- Load mailer configuration from MAILER_URL in .env
- Parse URL components for host, port, credentials, and encryption
- Add test email sending to mh.rouissi@gmail.com
- Include error handling with try-catch block
- Modify TAN email sending logic: comment out dev env check, enable in prod
- Adjust debug dump condition from dev to prod environment
- Improve paymentDetails method:
  - Add detailed PHPDoc with parameter/return types
  - Pre-fill payment form with inquiry data (gender, name, address)
  - Handle country code conversion (DE/AT)
  - Comment out Sofort payment option
- Enhance cardSuccess method:
  - Add PHPDoc documentation
  - Inject Invoice, Mailer, and RiserClient dependencies
  - Expand payment success handling:
    - Update payment status and confirmation date
    - Store Stripe customer data
    - Handle invoice creation
    - Send payment confirmation email
    - Confirm order with Riser
  - Improve error handling structure
- Remove Sofortüberweisung logo from payment options list
- Replace removed list item with Twig comment for clarity
- Remove unnecessary Google Tag Manager HTML comments
- Keep noscript GTM iframe for accessibility
- Maintain existing script loading logic
- Implement new extractCustomerData method to retrieve comprehensive customer information
- Extract data from payment intent including:
  - Name, email, and phone
  - Full billing address details
  - Payment method type and card details (brand, last4)
  - Customer metadata
- Use payment method as primary source, falling back to customer object
- Include error handling with logging for failed API calls
- Add PHPDoc documentation with parameter and return type details
- Add new Stripe customer properties with ORM mappings:
  - stripeCustomerName (string, 255, nullable)
  - stripeCustomerEmail (string, 255, nullable)
  - stripeCustomerAddressLine1 (string, 255, nullable)
  - stripeCustomerAddressCity (string, 255, nullable)
  - stripeCustomerAddressPostalCode (string, 50, nullable)
  - stripeCustomerAddressCountry (string, 2, nullable)
- Implement getter and setter methods for each new property
- Include PHPDoc annotations with return types and parameter documentation
- Maintain fluent interface with self-returning setters
- Remove Sofortüberweisung payment option from radio button choices
- Add Twig comment noting the removal
- Enhance handleInvoice JavaScript function:
  - Store initial required field selectors in dataset on first run
  - Use array iteration instead of for-in loops
  - Improve required field management with selector persistence
  - Maintain show/hide functionality for invoice subform
- Add customer details section with fields for:
  - Cardholder name
  - Email (pre-filled from inquiry)
  - Billing address (street, zip, city, country)
- Improve JavaScript payment handling:
  - Show form fields after Stripe loads
  - Collect billing details from form inputs
  - Pass billing details to Stripe confirmCardPayment
  - Disable submit button during processing
  - Hide postal code in card element (collected separately)
- Add CSS styling for:
  - Customer details container
  - Form group layout
  - Responsive form row arrangement
  - Card element and error display
- Maintain existing payment flow and error handling
- In InquiryController:
  - Add getClientIp method to capture client IP from request
  - Handle X-Forwarded-For header for proxy/load balancer cases
  - Set client IP on new inquiry creation
- In Inquiry entity:
  - Add clientIp field (string, 45 chars, nullable) for IPv4/IPv6 support
  - Add clientLocation field (string, 255 chars, nullable) for future use
  - Implement getters and setters for both new fields
  - Maintain fluent interface with self-returning setters
- Note: Location info left null for now, pending geolocation service integration
- Add novalidate attribute to form to disable browser validation
- Remove required attributes from inputs for custom validation
- Add error message divs below each form field
- Mark required fields with asterisk in labels
- Enhance JavaScript:
  - Add client-side validation for all fields
  - Validate name, email (format), address, zip, and city
  - Display custom error messages below fields
  - Clear previous errors on submit
  - Prevent submission if validation fails
- Update CSS:
  - Style error messages with red color and spacing
  - Adjust label styling for required field indicators
- Maintain existing Stripe payment flow
- Update CSS for .error-message class:
- Improve error visibility and visual hierarchy
- Maintain existing validation and form functionality
- Adjust whitespace and indentation for clientIp and clientLocation methods
- Improve code readability with consistent formatting
- No functional changes to logic or behavior
- Refactor card payment processing to properly verify Stripe payment status
- Fix issue where failed payments were marked as successful
- Add comprehensive error handling with detailed logging
- Implement better user feedback with specific error messages
- Update cardFail method to properly record payment failures
- Preserve session state to allow users to retry after payment failures
- Add try-catch blocks around non-critical operations to prevent unexpected errors
- Improve code documentation and readability
This merge prepares the feature branch for final integration by resolving
conflicts with the 'develop' branch.

Resolutions include:
- Combining the two unrelated histories.
- Fixing a file/directory conflict for 'wf10501/www' by keeping the
  directory from this branch and removing the conflicting file.
mrouissi merged commit 87982d1931 into master 2025-06-13 18:03:18 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Clients/neveling!17
No description provided.