public function PaymentForm()
    {
        // If no estimate found, generate error
        if (!$this->hasEstimate()) {
            return $this->redirect($this->Link("noestimate"));
        }
        
        $factory = new GatewayFieldsFactory($this->getPaymentMethod());

        $form = Form::create(
            $this,
            "PaymentForm",
            $factory->getFields(),
            FieldList::create(
                FormAction::create(
                    "doSubmitPayment",
                    _t("SilverCommerce\Checkout.PayNow", "Pay Now")
                )->addExtraClass("btn btn-success btn-block")
                ->setUseButtonTag(true)
            )
        );

        $this->extend("updatePaymentForm", $form);

        return $form;
    }
public function PaymentForm()
    {
        // If no estimate found, generate error
        if (!$this->hasEstimate()) {
            return $this->redirect($this->Link("noestimate"));
        }
        
        $factory = new GatewayFieldsFactory($this->getPaymentMethod());

        $form = Form::create(
            $this,
            "PaymentForm",
            $factory->getFields(),
            FieldList::create(
                FormAction::create(
                    "doSubmitPayment",
                    _t("SilverCommerce\Checkout.PayNow", "Pay Now")
                )->addExtraClass("btn btn-success btn-block")
                ->setUseButtonTag(true)
            )
        );

        $this->extend("updatePaymentForm", $form);

        return $form;
    }
public function PaymentForm ( ) { // If no estimate found, generate error if ( ! $ this -> hasEstimate ( ) ) { return $ this -> redirect ( $ this -> Link ( "noestimate" ) ) ; } $ factory = new GatewayFieldsFactory ( $ this -> getPaymentMethod ( ) ) ; $ form = Form :: create ( $ this , "PaymentForm" , $ factory -> getFields ( ) , FieldList :: create ( FormAction :: create ( "doSubmitPayment" , _t ( "SilverCommerce\Checkout.PayNow" , "Pay Now" ) ) -> addExtraClass ( "btn btn-success btn-block" ) -> setUseButtonTag ( true ) ) ) ; $ this -> extend ( "updatePaymentForm" , $ form ) ; return $ form ; }
Generate a payment form using omnipay scafold

@return Form
Generate a payment form using omnipay scafold