本文整理汇总了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/';
}
}
示例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/';
}
}
示例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');
}
示例4:
/**
* Class constructor
* Calls parent class constructor where PP config is set at instantiation.
*/
function __construct($options = null)
{
parent::__construct($options);
}
示例5: __construct
public function __construct()
{
parent::__construct();
}
示例6: __construct
public function __construct($sandboxflag = true)
{
parent::__construct($sandboxflag);
}
示例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();
}