PayPal\Auth\PPSignatureCredential::setApplicationId PHP Method

setApplicationId() public method

public setApplicationId ( $applicationId )
    public function setApplicationId($applicationId)
    {
        $this->applicationId = trim($applicationId);
    }

Usage Example

 /**
  * @test
  */
 public function testDefaultAPIAccount()
 {
     $req = new PPRequest(new StdClass(), 'NV');
     $httpConfig = new PPHttpConfig();
     $handler = new PPPlatformServiceHandler(null, 'sdkname', 'sdkversion');
     $handler->handle($httpConfig, $req, $this->options);
     $this->assertEquals($this->options['config']['acct1.Signature'], $req->getCredential()->getSignature());
     $cred = new PPSignatureCredential('user', 'pass', 'sig');
     $cred->setApplicationId('appId');
     $httpConfig = new PPHttpConfig();
     $handler = new PPPlatformServiceHandler($cred, 'sdkname', 'sdkversion');
     $handler->handle($httpConfig, $req, $this->options);
     $this->assertEquals($cred, $req->getCredential());
 }