public function testMultipleCallsDoesntIncludePreviousCallHandlers() { $firstHandler = $this->getMock('\\PayPal\\Handler\\IPPHandler'); $firstHandler->expects($this->once())->method('handle'); $req = new MockNVPClass(); $ret = $this->object->call(null, 'GetInvoiceDetails', $req, null, array($firstHandler)); $secondHandler = $this->getMock('\\PayPal\\Handler\\IPPHandler'); $secondHandler->expects($this->once())->method('handle'); $req = new MockNVPClass(); $ret = $this->object->call(null, 'GetInvoiceDetails', $req, null, array($secondHandler)); }
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']); } }
/** * @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); }
/** * @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, 'NV', array('PayPal\\Handler\\PPPlatformServiceHandler'), $config); parent::$SDK_NAME = self::$SDK_NAME; parent::$SDK_VERSION = self::$SDK_VERSION; }
/** * @test */ public function testGetServiceName() { $this->assertEquals('serviceName', $this->object->getServiceName()); }