Jump to content

Custom Payment Module:How Can i Pass smarty variables with in paymentoptions hook in prestashop 1.7 ?


Recommended Posts

I am worried about how can i pass smarty variable in paymentoptions hook in prestashop 1.7 version and get that variables in payment page.

 

In prestashop 1.7 paymentoptions  hooks looks like this,

 public function hookPaymentOptions($params)
    {
        $payment_options = new PaymentOption();
            $action_text = $this->l('Pay by Credit Card with Stripe Payment');
            /*$payment_options->setLogo(Media::getMediaPath(_PS_MODULE_DIR_.$this->name.'/views/img/card.png'));*/
            $payment_options->setCallToActionText($action_text);
            $payment_options->setAction($this->context->link->getModuleLink($this->name, 'confirmation', array(), true));
            $payment_options->setModuleName($this->name);
            $payment_options->setAdditionalInformation($this->context->smarty->fetch('module:stripepay/views/templates/hook/checkout.tpl'));
            $payments_options[] = $payment_options;
   
         return $payments_options;
    }

 

with in this hook how can i  pass this  secure_key ="FGDWFGF$#%#%!$" values in checkout.tpl files for making successful payments.

Now i have keep this as static.

Please anybody knows this please assist with this.

 

I hope you understand my question.

 

Edited by krishroman (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...