CyberSource / CyberSource/cybersource-rest-samples-php
Signature bug
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 31
- Forks
- 51
- Avg merge
- 36m
- Merged PRs (30d)
- 1
Description
Hi
I have been trying to get the "Cybersource" signature using the below codes but the response always says - "authentiaction failed!"
Can you please help me to solve this
/*Signature code/
$signatureString = "host: ".$request_host."\nrequest-target: ".$httpMethod." ".$resourcePath."\ndigest: SHA-256=".$digest."\nv-c-merchant-id: ".$merchant_id;
$signatureByteString = utf8_encode($signatureString);
$decodeKey = base64_decode($merchant_secret_key);
$signature = base64_encode(hash_hmac("sha256", $signatureByteString, $decodeKey, true));
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the signature code in the issue and compare its host, request-target, digest, merchant ID, key decoding, and HMAC inputs against the CyberSource REST API authentication documentation. Done means identifying the signing mismatch and confirming that the request authenticates successfully; no repository file or test is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100