• Hello,

    We are currently using the WP Hotel Booking plugin on our website and would like to integrate a local payment method that is commonly used in our country.

    We would appreciate it if you could let us know:

    Whether it is possible to integrate a custom or local payment gateway with your plugin.

    If yes, could you please provide any documentation or developer guidelines for adding a custom payment method?

    Are there any hooks, filters, or recommended best practices to ensure compatibility with future plugin updates?

    We look forward to your guidance on how we can proceed with this integration.

    Thank you in advance for your support!

Viewing 1 replies (of 1 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi aiyubpanara,

    Thank you for reaching out!

    You can easily add a new payment gateway by using the apply_filters( ‘hb_payment_gateways’, $defaults ); hook. This filter is located in the plugin file: wp-content/plugins/wp-hotel-booking/includes/wphb-functions.php.

    For a practical example of how to implement a new gateway using this hook, we recommend reviewing the existing PayPal payment gateway within the plugin. You can find its implementation in: wp-content/plugins/wp-hotel-booking/includes/gateways/paypal/class-wphb-payment-gateway-paypal.php.

    Specifically, pay close attention to how the hotel_booking_payment_paypal function utilizes this filter to register the PayPal gateway. By following a similar structure, you can define your custom payment method, including its settings, processing logic, and display.

    Using this hook is the recommended best practice for adding custom payment methods, as it ensures compatibility with future plugin updates since you won’t be directly modifying the core plugin files.

    Best regards,
    Brianvu-tp

Viewing 1 replies (of 1 total)

The topic ‘Request to Add Support for Local Payment Method’ is closed to new replies.