本文整理汇总了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>";
}
}
}