hook to append custom payment gateway for event payment

Hello support,

i am creating custom plugin for event booking payment through my custom payment gateway, Is there a hook to append my custom payment gateway for payment. please let me know asap.


  • Lindeni Mahlalela

    Hello JC

    I hope you are doing well today. I am really sorry for the delayed response from our side. I hope this finds you in order.

    There are some action hooks and filters you can use to hook your custom payment gateway. I have compiled the following code skeleton to show you what you should do to get started with your custom gateway. This is just a foundation laying out the necessary hooks to get your custom gateway recognized by Events+.

    Here is some code you may build upon:

    add_action( 'incsub_event_booking', 'book_an_event' );
    function book_an_event($event_id, $user_id, $booking_action){
    	//get details of event, and user
    	//perform $booking_action
    add_action( 'incsub_event_save_payments_meta', 'save_payment_meta',10,2 );
    function save_payment_meta($post_id, $meta){
    	//save the details of the payment
    add_action('eab-settings-after_payment_settings', 'custom_payment_settings');
    function custom_payment_settings(){
    	//display something after the payment settings
    add_action('eab-settings-after_plugin_settings', 'custom_plugin_settings');
    function custom_plugin_settings(){
    	//display gatway settings form
    do_action('eab-ipn-event_paid',10,3 );
    function ipn_event_paid($event_id, $amount, $booking_obj_id){
    	//do something if event paid via IPN
    add_filter('eab-settings-before_save', 'modify_settings_before_saving');
    function modify_settings_before_saving($options){
    	//modify and return your settings
    	$options['custom_gateway_option'] = '';
    	return $options;
    add_filter('eab-event-payment_status', 'change_payment_status');
    function change_payment_status($payment_status, $booking_user_id, $event){
      //change the status of the payment
    add_filter('eab-event-after_payment_forms', 'show_custom_payment_form');
    function show_custom_payment_form($content, $event_id){
    	//add your payment form HTML to $content, like
    	$content .= '<form></form>';
    	return $content;
    add_filters('eab-event-payment_forms', $content, $event_id);
    function custom_payment_form($content, $event_id){
    	//add your payment form HTML to $content, like
    	$content .= '<form></form>';
    	return $content;

    The above code includes the basic hooks to add settings page for you gateway, show a payment for on the booking page, perform transaction related to payment, book an event for a user after payment and a few other things you can achieve.

    I hope this helps and if you need more help, please do not hesitate to ask. I hope you enjoy your day.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.