public function checkout()
    {
        if (!class_exists($this->config()->checkout_class)) {
            return $this->httpError(404);
        }

        $checkout = Injector::inst()
            ->get($this->config()->checkout_class);
        $checkout->setEstimate($this->dataRecord);

        $this->extend("onBeforeCheckout");

        $this->redirect($checkout->Link());
    }
public function checkout()
    {
        if (!class_exists($this->config()->checkout_class)) {
            return $this->httpError(404);
        }

        $checkout = Injector::inst()
            ->get($this->config()->checkout_class);
        $checkout->setEstimate($this->dataRecord);

        $this->extend("onBeforeCheckout");

        $this->redirect($checkout->Link());
    }
public function checkout ( ) { if ( ! class_exists ( $ this -> config ( ) -> checkout_class ) ) { return $ this -> httpError ( 404 ) ; } $ checkout = Injector :: inst ( ) -> get ( $ this -> config ( ) -> checkout_class ) ; $ checkout -> setEstimate ( $ this -> dataRecord ) ; $ this -> extend ( "onBeforeCheckout" ) ; $ this -> redirect ( $ checkout -> Link ( ) ) ; }
Setup the checkout and redirect to it

@return Redirect
Setup the checkout and redirect to it