Recently I faced same situation as you are now.
There are many things you will have to check for this.
1) Put test url (Gateway URL, Transaction Details URL) instead of live url in authorize.net settings in payment section in admin.
2) Check if "Test Mode" is set to "Yes" in admin
3) Check all credentials you put in admin for authorize.net payment settings
4) This also happens when user does not enter correct billing address according to his card details.
There are some settings in Authorize.net you might consider to change or force user to enter his correct billing address according to card details he has.
To change this settings in Authorize.net:
a) Click Settings under Account in the main menu on the left.
b) Click Address Verification Service under Security Settings.
c) Under "General AVS Responses" uncheck all checkboxes under "Reject".
d) Under "Address and ZIP Code Responses" uncheck all checkboxes under "Reject".
These are the possiblity you can get your solutions. I will also suggest you when you place the order, try to get the real response in console. It will tell you exact error.
Authorize.Net is phasing out the MD5 based transHash element in favor of the SHA-512 based transHashSHA2. The setting in the Merchant Interface which controls the MD5 Hash option will be removed by the end of January 2019, and the transHash element will stop returning values at a later date to be determined.
This means you will no longer be able to use the MD5 for validation in the future but They do offer a Signature Key that is able to offer that same validation for your website/software that is currently utilizing the MD5. You can learn more about this process and how the Signature Key can be used in place of the MD5 here:
For Magento: https://support.magento.com/hc/en-us/articles/360024368392