Skip to main content

Version Docs Updated

Purpose

This page explains Rentiva's payment settings architecture and how the PaymentSettings class bridges to WooCommerce for managing payment gateways β€” rather than managing them directly.

πŸ’³ PaymentSettings Class

Rentiva follows a "Don't Reinvent the Wheel" principle for payment security and flexibility, delegating all payment processing to the WooCommerce layer. PaymentSettings is a control center that manages the health of this integration.


πŸ—οΈ Architectural Strategy: Delegation​

The Rentiva core does not process credit card or bank data directly. Instead:

  1. Frontend: When the booking form is completed, a WooCommerce order is created.
  2. PaymentSettings: This class checks whether WooCommerce is active and directs the administrator to the correct location in WC settings.
  3. Legal Compliance: Payment data is stored to WC standards; Rentiva only references the transaction ID.

πŸ›‘οΈ Integration Status Monitoring​

The render_payment_section_description() method verifies in real time whether the system can accept payments:

// Is WooCommerce loaded?
if ( class_exists( 'WooCommerce' ) ) {
// Quick link to WC Settings and Status Active badge
} else {
// Critical warning prompting the admin to install WC
}

πŸ”— Registration and Settings API​

PaymentSettings is registered as a section on Rentiva's central settings page (SettingsCore::PAGE).

  • Section ID: mhm_rentiva_general_payment_section
  • Hook: admin_init (via the central SettingsManager).

Payment settings are not limited to this class alone; operational settings are distributed across the following classes:

ClassResponsibility
WooCommerceBridgeProduct and order mappings.
EmailSettingsConfiguration of post-payment confirmation emails.
MaintenanceSettingsRate limiting and security rules on payment pages.

Section Summary​

  • Rentiva does not manage payment gateways; it uses WooCommerce as an engine.
  • PaymentSettings visualizes the settings and connection status of this bridge.
  • Gateway-specific settings (iyzico, Stripe, etc.) are always configured through WC.

Changelog​

DateVersionNote
23.04.20264.27.2English translation added.
19.03.20264.21.2Page rewritten from scratch to reflect the WooCommerce delegation strategy.