Solution:
Please do these changes inĀ gateway-pm.php
find function `process_payment
replace this code:
return array('result' => 'success', 'redirect' => add_query_arg('order',
$order->id, add_query_arg('key', $order->order_key, get_permalink(get_option('woocommerce_pay_page_id'))))
);
with
return array('result' => 'success', 'redirect' => $order->get_checkout_payment_url(true));