/** * @test */ public function testMakeRequestWithHandlers() { $req = new MockNVPClass(); $ret = $this->object->call(null, 'GetInvoiceDetails', $req, null, array(new MockHandler())); $this->assertContains("responseEnvelope.timestamp=", $ret); $this->assertEquals($req->toNVPString(), $this->object->getLastRequest()); $this->assertEquals($ret, $this->object->getLastResponse()); }
public function handle($httpConfig, $request, $options) { $httpConfig->addHeader('X-PAYPAL-REQUEST-DATA-FORMAT', $request->getBindingType()); $httpConfig->addHeader('X-PAYPAL-RESPONSE-DATA-FORMAT', $request->getBindingType()); $httpConfig->addHeader('X-PAYPAL-DEVICE-IPADDRESS', PPUtils::getLocalIPAddress()); $httpConfig->addHeader('X-PAYPAL-REQUEST-SOURCE', PPBaseService::getRequestSource()); if (isset($options['config']['service.SandboxEmailAddress'])) { $httpConfig->addHeader('X-PAYPAL-SANDBOX-EMAIL-ADDRESS', $options['config']['service.SandboxEmailAddress']); } }
public function handle($httpConfig, $request) { $config = PPConfigManager::getInstance(); $httpConfig->addHeader('X-PAYPAL-REQUEST-DATA-FORMAT', $request->getBindingType()); $httpConfig->addHeader('X-PAYPAL-RESPONSE-DATA-FORMAT', $request->getBindingType()); $httpConfig->addHeader('X-PAYPAL-DEVICE-IPADDRESS', PPUtils::getLocalIPAddress()); $httpConfig->addHeader('X-PAYPAL-REQUEST-SOURCE', PPBaseService::getRequestSource()); if (strstr($httpConfig->getUrl(), "/AdaptiveAccounts/") && strstr($httpConfig->getUrl(), "sandbox")) { $httpConfig->addHeader('X-PAYPAL-SANDBOX-EMAIL-ADDRESS', $config->get('service.SandboxEmailAddress')); } }
/** * @test */ public function testGetServiceName() { $this->assertEquals('serviceName', $this->object->getServiceName()); $this->assertEquals('sampletoken', $this->object->getAccessToken()); $this->assertEquals('sampleSrcret', $this->object->getTokenSecret()); }
public function __construct() { parent::__construct('AdaptivePayments'); }
public function __construct() { parent::__construct(self::$SERVICE_NAME, 'NV', array('PPPlatformServiceHandler')); parent::$SDK_NAME = self::$SDK_NAME; parent::$SDK_VERSION = self::$SDK_VERSION; }
public function __construct() { parent::__construct(self::$SERVICE_NAME, 'SOAP', array('PPMerchantServiceHandler')); }
public function __construct() { parent::__construct('AdaptiveAccounts'); }
public function __construct() { parent::__construct('PayPalAPIInterfaceService'); }
public function __construct() { parent::__construct('Permissions'); }
/** * * @param $config - Dynamic config map. This takes the higher precedence if config file is also present. */ public function __construct($config = null) { parent::__construct(self::$SERVICE_NAME, 'SOAP', $config); }
public function __construct() { parent::__construct('Invoice'); }
/** * @test */ public function testGetServiceName() { $this->assertEquals('serviceName', $this->object->getServiceName()); }
public function __construct($config = null) { parent::__construct(self::$SERVICE_NAME, 'SOAP', array('PPMerchantServiceHandler'), $config); parent::$SDK_NAME = self::$SDK_NAME; parent::$SDK_VERSION = self::$SDK_VERSION; }