Documentation You are here: start » v » 2.0 » hmac_validation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
v:2.0:hmac_validation [2019/07/10 21:22] – [PHP: Helper Function] marijav:2.0:hmac_validation [2020/03/24 03:37] – [Bundled Products] adam
Line 47: Line 47:
 </code> </code>
  
-With this function, for each product you want to hash, you need to provide the ''name'', ''value'', and ''code'' to it. The ''name'' and ''value'' arguments are the name and value pair of the particular product attribute you're hashing, and the ''code'' argument is the product's code value. **Note the value you pass off to the <code>get_verification</code> function should still be the actual value, not a url encoded version.**+With this function, for each product you want to hash, you need to provide the ''name'', ''value'', and ''code'' to it. The ''name'' and ''value'' arguments are the name and value pair of the particular product attribute you're hashing, and the ''code'' argument is the product's code value. **Note the value you pass off to the //get_verification/function should still be the actual value, not a url encoded version.**
  
 This function will return a hash based on the arguments provided - and return something that would look like this: This function will return a hash based on the arguments provided - and return something that would look like this:
Line 193: Line 193:
  
 ====Bundled Products==== ====Bundled Products====
-Because the child product in a bundled product setup often has a different price than if the product were added by itself, we require that the product code used to hash the child product contains both the parent code and the child code in the format {childcode}{parentcode}. So if you are adding a T-shirt with the code "shirtand a child product with the code "poster", the child product fields would be hashed with the code "postershirt". The parent product would be hashed like normal with the code "shirt".+As the child product in a bundled product setup often has a different price than if the product were added by itself, we require that the product code used to hash all attributes of the child product contains both the parent code and the child code in the format ''{childcode}{parentcode}'' (but without the curly brackets) 
 + 
 +For example, if you are adding a T-shirt with the code ''shirt'' and a child product with the code ''poster'', the child product attributes would be hashed with the code ''postershirt'', instead of just ''poster''. The parent product's attributes would be hashed like normal with the code ''shirt''.
 ==== An Example ==== ==== An Example ====
  

Site Tools