" make sure to check the signature returned from Gateway to ensure that the payment response is coming from the payment page and not from a hacker who is trying to modify the payment response; and display a “security violation was detected!” message if the signatures mismatching occurred. "

this message from external gateway but my question how i can check this signature ? i use hash('sha256',..); in php

  • Which payment gateway you are using. Are you trying to built a new custom payment method. – PHP Bugs May 18 '16 at 7:29
  • I'm used NetCommerce Payment gateway , yes i created a new custom payment method. – mahmoudismail May 18 '16 at 7:31

You can check the signature from Gateway per compare your signature with the payment gateway signature example :

$my_signature = '47783y74834332hd3873298392332';
$gateway_signature = '47783y74834332hd3873298392332'
if ($my_signature == $gateway_signature){ echo 'true'; }else{echo 'false';}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.