當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PayPal::getPackageRoot方法代碼示例

本文整理匯總了PHP中PayPal::getPackageRoot方法的典型用法代碼示例。如果您正苦於以下問題:PHP PayPal::getPackageRoot方法的具體用法?PHP PayPal::getPackageRoot怎麽用?PHP PayPal::getPackageRoot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PayPal的用法示例。


在下文中一共展示了PayPal::getPackageRoot方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getTypeList

 /**
  * Get information describing all types provided by the SDK.
  * @static
  */
 function getTypeList()
 {
     $root_dir = PayPal::getPackageRoot();
     $types = "{$root_dir}/Type/*.php";
     $files = glob($types);
     if (count($files) < 2) {
         return PayPal::raiseError("Types not found in package! (Looked for '{$types}')");
     }
     $retval = array();
     foreach ($files as $type_files) {
         $retval[] = basename(substr($type_files, 0, strpos($type_files, '.')));
     }
     return $retval;
 }
開發者ID:jabouzi,項目名稱:paypal,代碼行數:18,代碼來源:PayPal.php

示例2: getPayPalCertificateFile

 /**
  * Returns the PayPal public certificate filename.
  *
  * @param string The environment to get the certificate for.
  * @return mixed The path and file of the certificate file, or a PayPal error object on failure.
  */
 function getPayPalCertificateFile($environment)
 {
     $package_root = PayPal::getPackageRoot();
     $cert = $package_root . '/cert/' . strtolower($environment) . '.paypal.com.pem';
     if (@(include "{$package_root}/conf/paypal-sdk.php")) {
         if (isset($__PP_CONFIG['paypal_cert_file']) && !empty($__PP_CONFIG['paypal_cert_file'])) {
             $cert = $__PP_CONFIG['paypal_cert_file'][$environment];
         }
     }
     if (!file_exists($cert)) {
         return PayPal::raiseError("Could not file Paypal public Certificate file '{$cert}'");
     }
     return $cert;
 }
開發者ID:janaece,項目名稱:globalclassroom4_clean,代碼行數:20,代碼來源:EWPServices.php

示例3: _getHandlerPaths

/**
 * Returns an array of paths where the Admin should search for Profile Handler classes
 *
 * @internal
 * @return array An array of paths to search
 */
function _getHandlerPaths()
{
    $package_root = PayPal::getPackageRoot();
    $handler_paths = array("{$package_root}/Profile/Handler");
    if (@(include "{$package_root}/conf/paypal-sdk.php")) {
        if (isset($__PP_CONFIG['custom_handler_dir']) && is_array($__PP_CONFIG['custom_handler_dir'])) {
            $handler_paths = array_merge($__PP_CONFIG['custom_handler_dir'], $handler_paths);
        }
    }
    return $handler_paths;
}
開發者ID:AGProjects,項目名稱:cdrtool,代碼行數:17,代碼來源:functions.inc.php


注:本文中的PayPal::getPackageRoot方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。