When I try to pay with Mastercard credit card module I get an error

bad request 400

If I go to my var/log/exception.log file I receive the following error:

main.CRITICAL: The HOME or COMPOSER_HOME environment variable must be set for composer to run correctly at /var/www/html/emall/vendor/composer/composer/src/Composer/Factory.php:641)"} []

I have tried many commands found in Internet, but I don´t know if the problem is with composer or with the module itself. This is the module that im using: https://marketplace.magento.com/ontap-module-mastercard.html

Hope someone can help. Thank you and regards!

  • Your magento version please. – Raj Mohan R Jun 30 '19 at 15:56
  • Hello. I`m using Magento 2.2. – Oscar Vazquez Jun 30 '19 at 22:50
  • Have you enabled debug mode and can you able to see the request and response details in payment log? – Raj Mohan R Jul 1 '19 at 3:46
  • sorry its a little bit late. But yes, i have enabled debug mode and in Payment Log I see Authentication_Successful. It connects with Mastercard successfully , but it does not perform the transaction. – Oscar Vazquez Jul 11 '19 at 14:18
  • So can you please check the configurations on both side to see if there is no error in configuration – Raj Mohan R Jul 11 '19 at 14:26

after trying a lot of thing I found the solution, in case you have the same problem than me.

I just setEnv the composer variable in .htaccess of the store. Add this line at the top of your MagentoRootfolder/.htaccess file

| improve this answer | |

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.