Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Generating Signature hash issue
For some reason, I'm getting "Authorization Failed" error when trying to do simple integration with Cybersource REST using the HTTP Signature method. It looks like I have issue in generating the Signature hash. With the example below in C#.
paramdate = "Sat, 04 May 2024 12:49:49 GMT";
Digest = "SHA-256=LDtgqvifUua0IfbA4ZzNpk7xI588HH299/Cp5NT0XzA=";
SecretKey = "0TJqiAKWKxdfyTQb++Qjt9Zw//S7b/lxB0FiLfDO8v8=";
merchantID = "gosignmeup_1714463309";
signature string
var SignatureParm = "host: apitest.cybersource.com\nv-c-date: Sat, 04 May 2024 12:49:49 GMT\n(request-target): post /pts/v2/payments/\ndigest: SHA-256=LDtgqvifUua0IfbA4ZzNpk7xI588HH299/Cp5NT0XzA=\nv-c-merchant-id: gosignmeup_1714463309";
generating hash
var SignatureHash = GenerateSignatureFromParams(SignatureParm, SecretKey); //using C# function from Cybersource Demo
I would get this SignatureHash = "UPGZw6z5J0zy9/ogchmv23qTWT7lf0mmpCkhCKKUPaw=" instead of the hash "5dCGDaAK2AqSpr1KPPKYqZfQAKkidsMfJsddOr7zjJg=" generated by Cybersource online Dev Test using same info above.
Am I missing anything? Any thought?
โ05-04-2024 06:19 AM - edited โ05-04-2024 06:26 AM
0 REPLIES 0

