Ejemplo n.º 1
0
 /**
  * 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/';
     }
 }
Ejemplo n.º 2
0
 /**
  * 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/';
     }
 }
Ejemplo n.º 3
0
 /**
  * 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');
 }
Ejemplo n.º 4
0
 /**
  *    Class constructor
  *    Calls parent class constructor where PP config is set at instantiation.
  */
 function __construct($options = null)
 {
     parent::__construct($options);
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     parent::__construct();
 }
 public function __construct($sandboxflag = true)
 {
     parent::__construct($sandboxflag);
 }
Ejemplo n.º 7
0
 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();
 }