✏️ 正在编辑: AxeptaCustomerOneClickPaymentCard.php
路径:
/home/bpioifn/www/pigmentse/modules/axepta/classes/AxeptaCustomerOneClickPaymentCard.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php /** * 1997-2020 Quadra Informatique * * 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 1997-2020 Quadra Informatique * @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ class AxeptaCustomerOneClickPaymentCard extends ObjectModel { /** * ID * @var integer */ public $id; /** * * @var integer */ public $pcnr; /** * * @var string */ public $ccexpiry; /** * Object * @var string */ public $ccbrand; /** * Object * @var string */ public $holder_name; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'axepta_customer_oneclick_payment_card', 'primary' => 'id', 'fields' => array( 'id_customer' => array( 'type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => true ), 'pcnr' => array( 'type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true ), 'ccexpiry' => array( 'type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true ), 'ccbrand' => array( 'type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true ), 'holder_name' => array( 'type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true ), ) ); public static function getRegistersCard($id_customer) { if ((int) $id_customer) { return Db::getInstance()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'axepta_customer_oneclick_payment_card' . ' WHERE id_customer = ' . (int) $id_customer); } return false; // INSERT INTO `ps_axepta_customer_oneclick_payment_card` (`id`, `id_customer`, `pcnr`, `ccexpiry`, `ccbrand`) VALUES('1', '1', '20', '20', '20'); } public static function getTrigramByCcbrand($ccbrand) { if ($ccbrand) { return Db::getInstance()->getValue('SELECT trigram FROM `' . _DB_PREFIX_ . 'axepta_xml_method`' . ' WHERE code LIKE "%' . pSQL($ccbrand) . '%"'); } } public static function verifyIfCardExist($id_customer, $pcnr) { if ((int) $id_customer && $pcnr) { return Db::getInstance()->getRow( 'SELECT * FROM ' . _DB_PREFIX_ . 'axepta_customer_oneclick_payment_card WHERE id_customer = ' . (int) $id_customer . ' AND pcnr = "'. pSQL($pcnr) .'"' ); } return false; // INSERT INTO `ps_axepta_customer_oneclick_payment_card` (`id`, `id_customer`, `pcnr`, `ccexpiry`, `ccbrand`) VALUES('1', '1', '20', '20', '20'); } /* * get all recurring payment for given customer */ public static function getAllOneClickPayment($id_customer = 0) { return Db::getInstance()->executeS( 'SELECT * FROM `' . _DB_PREFIX_ . 'axepta_customer_oneclick_payment_card` WHERE `id_customer` = ' . (int) $id_customer ); } }
💾 保存文件
← 返回文件管理器