public function init()
 {
     parent::init();
     // Check if payment slug is set and that corresponds to a payment
     if ($this->request->param('ID') && ($method = CommercePaymentMethod::get()->byID($this->request->param('ID')))) {
         $this->payment_method = $method;
     } elseif ($method = CommercePaymentMethod::get()->byID(Session::get('Commerce.PaymentMethodID'))) {
         $this->payment_method = $method;
     }
     // Setup payment handler
     if ($this->payment_method && $this->payment_method !== null) {
         $handler = $this->payment_method->ClassName;
         $handler = $handler::$handler;
         $this->payment_handler = $handler::create();
         $this->payment_handler->setRequest($this->request);
         $this->payment_handler->setURLParams = $this->request->allParams();
         $this->payment_handler->setPaymentGateway($this->getPaymentMethod());
     }
 }