Exemplo n.º 1
0
 /// <summary>
 /// Add a signature to a Hash of parameters. The signature will be generated
 /// from the app secret and the provided parameters, and should be used
 /// whenever signed data needs to be sent to GoCardless (e.g. when creating
 /// a new subscription). The signature will be added to the hash under the
 /// key signature.
 /// </summary>
 /// <param name="params">the parameters to sign</param>
 /// <returns>the parameters with the new signature key</returns>
 private static Utils.HashParams SignParams(Utils.HashParams @params)
 {
     var signature = Utils.GetSignatureForParams(@params, GoCardless.AccountDetails.AppSecret);
     @params.Add("signature", signature);
     return @params;
 }