Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature bug #73

Open
bispldeveloper opened this issue Mar 22, 2024 · 0 comments
Open

Signature bug #73

bispldeveloper opened this issue Mar 22, 2024 · 0 comments

Comments

@bispldeveloper
Copy link

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant