当前位置: 首页>>代码示例>>PHP>>正文


PHP Am_Paysystem_Abstract::onSetupForms方法代码示例

本文整理汇总了PHP中Am_Paysystem_Abstract::onSetupForms方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Paysystem_Abstract::onSetupForms方法的具体用法?PHP Am_Paysystem_Abstract::onSetupForms怎么用?PHP Am_Paysystem_Abstract::onSetupForms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Am_Paysystem_Abstract的用法示例。


在下文中一共展示了Am_Paysystem_Abstract::onSetupForms方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onSetupForms

    public function onSetupForms(Am_Event_SetupForms $event)
    {
        // insert title, description fields
        $form = parent::onSetupForms($event);
        $form->setTitle(ucfirst(toCamelCase($this->getId())));
        $el = $form->addSelect('payment.' . $this->getId() . '.reattempt', array('multiple' => 'multiple', 'class' => 'magicselect'));
        $options = array();
        for ($i = 1; $i < 60; $i++) {
            $options[$i] = ___("on %d-th day", $i);
        }
        $el->loadOptions($options);
        $el->setLabel(___("Retry On Failure\n" . "if the recurring billing has failed,\n" . "aMember can repeat it after several days,\n" . "and extend customer subscription for that period\n" . "enter number of days to repeat billing attempt"));
        $text = "<p><font color='red'>WARNING!</font> Every application processing credit card information, must be certified\n" . "as PA-DSS compliant, and every website processing credit cards must\n" . "be certified as PCI-DSS compliant.</p>";
        $text .= "<p>aMember Pro is not yet certified as PA-DSS compliant. We will start certification process\n" . "once we get 4.2.0 branch released and stable. This plugins is provided solely for TESTING purproses\n" . "Use it for anything else but testing at your own risk.</p>";
        $form->addProlog(<<<CUT
<div class="warning_box">
    {$text}
</div>   
CUT
);
        $keyFile = defined('AM_KEYFILE') ? AM_KEYFILE : APPLICATION_PATH . '/configs/key.php';
        if (!is_readable($keyFile)) {
            $random = $this->getDi()->app->generateRandomString(78);
            $text = "<p>To use credit card plugins, you need to create a key file that contains unique\n";
            $text .= "encryption key for your website. It is necessary even if the plugin does not\n";
            $text .= "store sensitive information.</p>";
            $text .= "<p>In a text editor, create file with the following content (one-line, no spaces before opening &lt;?php):\n";
            $text .= "<br /><br /><pre style='background-color: #e0e0e0;'>&lt;?php return '{$random}';</pre>\n";
            $text .= "<br />save the file as <b>key.php</b>, and upload to <i>amember/application/configs/</i> folder.\n";
            $text .= "This warning will disappear once you do it correctly.</p>";
            $text .= "<p>KEEP A BACKUP COPY OF THE key.php FILE (!)</p>";
            $form->addProlog(<<<CUT
<div class="warning_box">
    {$text}
</div>
CUT
);
        }
    }
开发者ID:subashemphasize,项目名称:test_site,代码行数:39,代码来源:CreditCard.php


注:本文中的Am_Paysystem_Abstract::onSetupForms方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。