Nayana Chandran Posted November 15, 2016 Share Posted November 15, 2016 (edited) Guys, I tried to add a credit card form in my payment module, And my code is below. public function getEmbeddedPaymentOption($data, $embeddedOption) { $embeddedOption->setCallToActionText($this->l($data['payment_name'], array(),'Modules.Mymodule.admin')) ->setAdditionalInformation($this->context->smarty->fetch($data['info_tpl'])) ->setForm($this->generatePaymentForm($data['payment_name'])) ->setLogo(Media::getMediaPath(_PS_MODULE_DIR_.$this->name.$data['logo_path'])); return $embeddedOption; } public function generatePaymentForm($payment) { $this->context->smarty->assign([ 'payment' => $payment, ]); return $this->context->smarty->fetch('module:mymodule/views/templates/front/payment_form.tpl'); } How the setForm will execute, I didn't show any form in payment page. If any one can please share. I enabled debug mode, and there is no more errors Thanks in advance Edited November 15, 2016 by Nayana Chandran (see edit history) Link to comment Share on other sites More sharing options...
0 bellini13 Posted November 16, 2016 Share Posted November 16, 2016 Use this as a guide https://github.com/PrestaShop/paymentexample Link to comment Share on other sites More sharing options...
0 Nayana Chandran Posted November 16, 2016 Author Share Posted November 16, 2016 Thank you! I got it. Link to comment Share on other sites More sharing options...
Question
Nayana Chandran
Guys,
I tried to add a credit card form in my payment module, And my code is below.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now