Created
May 22, 2014 20:42
-
-
Save jz5/d240691b29a402b7b12b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Sample/src/SignedRequestHelper.cs b/Sample/src/SignedRequestHelper.cs | |
index 050e946..dec1058 100644 | |
--- a/Sample/src/SignedRequestHelper.cs | |
+++ b/Sample/src/SignedRequestHelper.cs | |
@@ -31,6 +31,7 @@ namespace AmazonProductAdvtApi | |
{ | |
private string endPoint; | |
private string akid; | |
+ private string associateTag; | |
private byte[] secret; | |
private HMAC signer; | |
@@ -49,11 +50,12 @@ namespace AmazonProductAdvtApi | |
* FR: ecs.amazonaws.fr | |
* CA: ecs.amazonaws.ca | |
*/ | |
- public SignedRequestHelper(string awsAccessKeyId, string awsSecretKey, string destination) | |
+ public SignedRequestHelper(string awsAccessKeyId, string awsSecretKey, string destination, string associateTag) | |
{ | |
this.endPoint = destination.ToLower(); | |
this.akid = awsAccessKeyId; | |
this.secret = Encoding.UTF8.GetBytes(awsSecretKey); | |
+ this.associateTag = associateTag; | |
this.signer = new HMACSHA256(this.secret); | |
} | |
@@ -73,6 +75,7 @@ namespace AmazonProductAdvtApi | |
// Add the AWSAccessKeyId and Timestamp to the requests. | |
sortedMap["AWSAccessKeyId"] = this.akid; | |
sortedMap["Timestamp"] = this.GetTimestamp(); | |
+ sortedMap["AssociateTag"] = this.associateTag; | |
// Get the canonical query string | |
string canonicalQS = this.ConstructCanonicalQueryString(sortedMap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment