Add New Payment Gateway

Would like you to look into the code and see what's wrong. Thank you.

My problem is payment notification isn't worked with this url "http://mydomain.com/index.php?dispatch=payment_notification.notify&payment=veritrans"

<?php
/***************************************************************************
*                                                                          *
*   (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev    *
*                                                                          *
* This  is  commercial  software,  only  users  who have purchased a valid *
* license  and  accept  to the terms of the  License Agreement can install *
* and use this program.                                                    *
*                                                                          *
****************************************************************************
* PLEASE READ THE FULL TEXT  OF THE SOFTWARE  LICENSE   AGREEMENT  IN  THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE.            *
****************************************************************************/
require_once('veritrans/Veritrans.php');
Veritrans_Config::$serverKey = 'my server key';

if (!defined(‘BOOTSTRAP’)) { die(‘Access denied’); }

if (defined(‘PAYMENT_NOTIFICATION’)) {
if ($mode == ‘process’) {
$pp_response[“order_status”] = (($_REQUEST[‘status_code’] == “200”) ? ‘P’ : ‘F’);

    if ($_REQUEST['status_code'] == '202') {
	    $pp_response["order_status"] = 'I';
	    $pp_response["reason_text"] = "Cancelled";
    } elseif ($_REQUEST['status_code'] != '200') {
	    $pp_response["reason_text"] = "Error";
    }
    if (isset($_REQUEST['status_message'])) {
	    $pp_response["reason_text"].= ": " . $_REQUEST['status_message'];
    }
    if (isset($_REQUEST['transaction_id'])) {
	    $pp_response["transaction_id"] = $_REQUEST['transaction_id'];
    }
    $order_id = $_REQUEST['order_id'];
    if (fn_check_payment_script('veritranspay.php', $order_id)) {
	    fn_finish_payment($order_id, $pp_response, false);
	    fn_order_placement_routines('route', $order_id);
    }
}

} else {

// Uncomment for production environment
// Veritrans_Config::$isProduction = true;

// Comment to disable sanitization
// Veritrans_Config::$isSanitized = true;

// Comment to disable 3D-Secure
// Veritrans_Config::$is3ds = true;

$transaction_details= array(   
    'order_id'     => $order_id,
    'gross_amount' => $order_info['total'] 
);

$customer_details= array(   
    'first_name'   => $order_info['firstname'],
    'last_name'    => $order_info['lastname'],
    'email'        => $order_info['email'],
    'phone'        => $order_info['phone']
);

$transaction = array(
    'transaction_details' => $transaction_details,
    'customer_details' => $customer_details,
);

$vtweb_url = Veritrans_Vtweb::getRedirectionUrl($transaction);

fn_create_payment_form($vtweb_url, 'veritrans');

}

You use notify mode in the URL, but check the process one. Please correct and check