PayPal\Auth\PPSignatureCredential::validate PHP Method

validate() public method

public validate ( )
    public function validate()
    {
        if (empty($this->userName)) {
            throw new PPMissingCredentialException("username cannot be empty");
        }
        if (empty($this->password)) {
            throw new PPMissingCredentialException("password cannot be empty");
        }
        // Signature can be empty if using 3-rd party auth tokens from permissions API
    }

Usage Example

 /**
  * @test
  */
 public function testValidatepwd()
 {
     $this->setExpectedException('PayPal\\Exception\\PPMissingCredentialException');
     $cred = new PPSignatureCredential("platfo_1255077030_biz_api1.gmail.com", "", "Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf");
     $cred->validate();
 }