/// <summary> /// Processing for TokenAuthorization using SignatureCredential /// </summary> /// <param name="certCredential"></param> /// <param name="tokenAuthorize"></param> /// <returns></returns> protected override Dictionary <string, string> ProcessTokenAuthorization(CertificateCredential certCredential, TokenAuthorization tokenAuthorize) { Dictionary <string, string> headers = new Dictionary <string, string>(); try { OAuthGenerator signGenerator = new OAuthGenerator(certCredential.UserName, certCredential.Password); signGenerator.SetToken(tokenAuthorize.AccessToken); signGenerator.SetTokenSecret(tokenAuthorize.AccessTokenSecret); string tokenTimeStamp = Timestamp; signGenerator.SetTokenTimestamp(tokenTimeStamp); logger.DebugFormat("token = " + tokenAuthorize.AccessToken + " tokenSecret=" + tokenAuthorize.AccessTokenSecret + " uri=" + endpointUrl); signGenerator.SetRequestUri(endpointUrl); //Compute Signature string sign = signGenerator.ComputeSignature(); logger.DebugFormat("Permissions signature: " + sign); string authorization = "token=" + tokenAuthorize.AccessToken + ",signature=" + sign + ",timestamp=" + tokenTimeStamp; logger.DebugFormat("Authorization string: " + authorization); headers.Add(BaseConstants.PayPalAuthorizationPlatformHeader, authorization); } catch (OAuthException oex) { throw oex; } return(headers); }