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


PHP Checkout::initSinglePrerequisiteValidationResults方法代码示例

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


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

示例1: initAdditionalPrerequisitesValidationResults

 function initAdditionalPrerequisitesValidationResults($prerequisite_type, $force_rewrite = true)
 {
     /* Inquire all Payment modules.
           If the method getInitPrerequisitesValidationResultsData exists - call it
           and add a corresponding prerequisite.
        */
     global $application;
     /* create the object Modules_Manager to upload all required modules */
     $mmObj =& $application->getInstance('Modules_Manager');
     $modules = Checkout::getInstalledAndActiveModulesListData("payment");
     foreach ($modules as $moduleInfo) {
         /* Load a required file */
         $mmObj->includeAPIFileOnce($moduleInfo->name);
         /* This condition can be checked only after loading */
         if (is_callable(array($moduleInfo->name, "getAdditionalPersonInfoVariantTag"))) {
             /* It MUST be called statically,
              * otherwise, if modApiFunc is used, the object of this module
              * will be created, which will lead to creation
              * of the checkout object, so the payment/shipping module will
              * ask the checkout object for isActive, and that will lead to
              * the complete cycling. */
             $variant_tag = call_user_func(array($moduleInfo->name, 'getAdditionalPersonInfoVariantTag'), $prerequisite_type);
             //false                     ,                       Checkout CZ              -
             //                                    CCInfo        : AuthorizeNet, PaypalPro.
             //            ,                                     CCInfo,        ,                      -
             //         false.                    CCInfo                        .
             if ($variant_tag !== false) {
                 $prerequisite_name = Checkout::getAdditionalPrerequisiteName($prerequisite_type, call_user_func(array($moduleInfo->name, "getUid")));
                 if ($force_rewrite || !isset($this->PrerequisitesValidationResults[$prerequisite_name])) {
                     $variant_id = Checkout::getPersonInfoVariantId($prerequisite_type, $variant_tag);
                     $variant_info = Checkout::getPersonVariantInfo($variant_id);
                     $variant_view_tag = $prerequisite_name;
                     $prerequisite_data = array("variant_view_tag" => $variant_view_tag, "variant_tag" => $variant_info['variant_tag'], "variant_type_id" => $variant_info['type_id'], "variant_visible_name" => $variant_info['visible_name']);
                     Checkout::initSinglePrerequisiteValidationResults($prerequisite_data["variant_view_tag"], $prerequisite_data["variant_tag"], $prerequisite_data["variant_type_id"], $prerequisite_data["variant_visible_name"]);
                 }
             }
         } else {
             //echo "DIE not callable: ". $moduleInfo->name . " getInitPrerequisitesValidationResultsData();" . "<br>";
         }
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:41,代码来源:checkout_api.php


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