Failed transaction throwing an error on line 305

I declare $order = new WC_Order($order_id) before if($transaction['status'] == 'Approved') to solve the problem
Merge branch 'patch-1' of https://github.com/deus-ex/voguepay-woocommerce-payment-gateway into deus-ex-patch-1

Conflicts:
	voguepay-woocommerce-payment-gateway.php