✏️ 正在编辑: oneClickPayment.php
路径:
/home/bpioifn/www/pigmentse/modules/axepta/controllers/front/oneClickPayment.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * 1961-2019 BNP Paribas * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) that is available * through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0 * If you are unable to obtain it through the world-wide-web, please send an email * to modules@quadra-informatique.fr so we can send you a copy immediately. * * @author Quadra Informatique <modules@quadra-informatique.fr> * @copyright 1961-2019 BNP Paribas * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ require_once _PS_MODULE_DIR_ . 'axepta/classes/AxeptaCustomerOneClickPaymentCard.php'; class AxeptaOneClickPaymentModuleFrontController extends ModuleFrontController { /** Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { parent::initContent(); $payment_oneclick_list = AxeptaCustomerOneClickPaymentCard::getAllOneClickPayment($this->context->customer->id); /*if (is_array($payment_oneclick_list)) { foreach ($payment_oneclick_list as $key => $value) { $oneclick_payment = new AxeptaCustomerOneClickPaymentCard($value['id']); } }*/ $link = new Link(); foreach ($payment_oneclick_list as $key => $payment) { $payment_oneclick_list[$key]["payment_display"] = Tools::substr($payment['pcnr'], -3); } $this->context->smarty->assign(array( 'payment_oneclick_list' => $payment_oneclick_list, 'url' => $link->getModuleLink('axepta', 'oneClickPayment') )); $this->setTemplate('module:axepta/views/templates/front/oneclick_payment_list.tpl'); } public function postProcess() { $conf = false; if (Tools::isSubmit('axepta_stop_oneclick_unique_form')) { $oneclick_card = new AxeptaCustomerOneClickPaymentCard(Tools::getValue('id_axepta_customer_oneclick_payment')); $oneclick_card->delete(); $conf = true; } $this->context->smarty->assign(array( 'display_conf' => $conf, )); } }
💾 保存文件
← 返回文件管理器