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


PHP PayPal::__construct方法代码示例

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


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

示例1: isset

 /**
  * Constructor
  *
  * @access	public
  * @param	array	config preferences
  * @return	void
  */
 function __construct($DataArray)
 {
     parent::__construct($DataArray);
     $this->XMLNamespace = 'http://svcs.paypal.com/types/ap';
     $this->DeviceID = isset($DataArray['DeviceID']) ? $DataArray['DeviceID'] : '';
     $this->IPAddress = isset($DataArray['IPAddress']) ? $DataArray['IPAddress'] : $_SERVER['REMOTE_ADDR'];
     $this->DetailLevel = isset($DataArray['DetailLevel']) ? $DataArray['DetailLevel'] : 'ReturnAll';
     $this->ErrorLanguage = isset($DataArray['ErrorLanguage']) ? $DataArray['ErrorLanguage'] : 'en_US';
     $this->APISubject = isset($DataArray['APISubject']) ? $DataArray['APISubject'] : '';
     $this->DeveloperAccountEmail = isset($DataArray['DeveloperAccountEmail']) ? $DataArray['DeveloperAccountEmail'] : '';
     if ($this->Sandbox) {
         // Sandbox Credentials
         $this->ApplicationID = isset($DataArray['ApplicationID']) ? $DataArray['ApplicationID'] : '';
         $this->APIUsername = isset($DataArray['APIUsername']) && $DataArray['APIUsername'] != '' ? $DataArray['APIUsername'] : '';
         $this->APIPassword = isset($DataArray['APIPassword']) && $DataArray['APIPassword'] != '' ? $DataArray['APIPassword'] : '';
         $this->APISignature = isset($DataArray['APISignature']) && $DataArray['APISignature'] != '' ? $DataArray['APISignature'] : '';
         $this->EndPointURL = isset($DataArray['EndPointURL']) && $DataArray['EndPointURL'] != '' ? $DataArray['EndPointURL'] : 'https://svcs.sandbox.paypal.com/';
     } elseif ($this->BetaSandbox) {
         // Beta Sandbox Credentials
         $this->ApplicationID = isset($DataArray['ApplicationID']) ? $DataArray['ApplicationID'] : '';
         $this->APIUsername = isset($DataArray['APIUsername']) && $DataArray['APIUsername'] != '' ? $DataArray['APIUsername'] : '';
         $this->APIPassword = isset($DataArray['APIPassword']) && $DataArray['APIPassword'] != '' ? $DataArray['APIPassword'] : '';
         $this->APISignature = isset($DataArray['APISignature']) && $DataArray['APISignature'] != '' ? $DataArray['APISignature'] : '';
         $this->EndPointURL = isset($DataArray['EndPointURL']) && $DataArray['EndPointURL'] != '' ? $DataArray['EndPointURL'] : 'https://svcs.beta-sandbox.paypal.com/';
     } else {
         // Live Credentials
         $this->ApplicationID = isset($DataArray['ApplicationID']) ? $DataArray['ApplicationID'] : '';
         $this->APIUsername = isset($DataArray['APIUsername']) && $DataArray['APIUsername'] != '' ? $DataArray['APIUsername'] : '';
         $this->APIPassword = isset($DataArray['APIPassword']) && $DataArray['APIPassword'] != '' ? $DataArray['APIPassword'] : '';
         $this->APISignature = isset($DataArray['APISignature']) && $DataArray['APISignature'] != '' ? $DataArray['APISignature'] : '';
         $this->EndPointURL = isset($DataArray['EndPointURL']) && $DataArray['EndPointURL'] != '' ? $DataArray['EndPointURL'] : 'https://svcs.paypal.com/';
     }
 }
开发者ID:shivram2609,项目名称:e-leran,代码行数:40,代码来源:paypal.adaptive.class.php

示例2: isset

 /**
  * Constructor
  *
  * @access	public
  * @param	array	config preferences
  * @return	void
  */
 function __construct($DataArray)
 {
     parent::__construct($DataArray);
     $this->AccessKey = isset($DataArray['AccessKey']) ? $DataArray['AccessKey'] : '';
     $this->ClientSecret = isset($DataArray['ClientSecret']) && $DataArray['ClientSecret'] != '' ? $DataArray['ClientSecret'] : '';
     if ($this->Sandbox) {
         $this->EndPointURL = isset($DataArray['EndPointURL']) && $DataArray['EndPointURL'] != '' ? $DataArray['EndPointURL'] : 'https://api.financing-mint.paypal.com/finapi/v1/publishers/';
     } else {
         $this->EndPointURL = isset($DataArray['EndPointURL']) && $DataArray['EndPointURL'] != '' ? $DataArray['EndPointURL'] : 'https://api.financing.paypal.com/finapi/v1/publishers/';
     }
 }
开发者ID:shivram2609,项目名称:e-leran,代码行数:18,代码来源:paypal.financing.class.php

示例3: isset

 /**
  * Constructor
  *
  * @access	public
  * @param	mixed[]	$DataArray	Array structure providing config data
  * @return	void
  */
 function __construct($DataArray)
 {
     parent::__construct($DataArray);
     $this->APIVendor = isset($DataArray['APIVendor']) ? $DataArray['APIVendor'] : '';
     $this->APIPartner = isset($DataArray['APIPartner']) ? $DataArray['APIPartner'] : '';
     $this->Verbosity = isset($DataArray['Verbosity']) ? $DataArray['Verbosity'] : 'HIGH';
     if ($this->Sandbox) {
         $this->APIEndPoint = 'https://pilot-payflowpro.paypal.com';
     } else {
         $this->APIEndPoint = 'https://payflowpro.paypal.com';
     }
     $this->NVPCredentials = 'BUTTONSOURCE[' . strlen($this->APIButtonSource) . ']=' . $this->APIButtonSource . '&VERBOSITY[' . strlen($this->Verbosity) . ']=' . $this->Verbosity . '&USER[' . strlen($this->APIUsername) . ']=' . $this->APIUsername . '&VENDOR[' . strlen($this->APIVendor) . ']=' . $this->APIVendor . '&PARTNER[' . strlen($this->APIPartner) . ']=' . $this->APIPartner . '&PWD[' . strlen($this->APIPassword) . ']=' . $this->APIPassword;
     $this->TransactionStateCodes = array('1' => 'Error', '6' => 'Settlement Pending', '7' => 'Settlement in Progress', '8' => 'Settlement Completed Successfully', '11' => 'Settlement Failed', '14' => 'Settlement Incomplete');
 }
开发者ID:princejeru10,项目名称:dras,代码行数:21,代码来源:PayFlow.php

示例4:

 /**
  *    Class constructor
  *    Calls parent class constructor where PP config is set at instantiation.
  */
 function __construct($options = null)
 {
     parent::__construct($options);
 }
开发者ID:kreative,项目名称:f3-pypl,代码行数:8,代码来源:PayPalRP.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:4,代码来源:notifier.php

示例6: __construct

 public function __construct($sandboxflag = true)
 {
     parent::__construct($sandboxflag);
 }
开发者ID:laiello,项目名称:a-paypal-express-class,代码行数:4,代码来源:PaypalPayment.class.php

示例7:

 function __construct()
 {
     parent::__construct();
     //provider
     //name - electronic payment - paypal
     $this->drAccounts[] = Account::GetAccount('PayPal', 'ledgers');
     $this->drRatios[] = 1;
     $this->crAccounts[] = Account::GetAccount('Sales Revenue', 'ledgers');
     $this->crRatios[] = 1;
     //this info should originate from the database, insert ignore protocol included
     //$this->code = self::GetCode('PayPal');
     //parent::__construct();
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:13,代码来源:ShopDomain.php


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