In our project we have used Commerce Authorize.Net module. We have not added any discount. No coupons are applied yet still when we proceed to checkout in testing mode we are always getting error as "A valid amount is required.". Our product price is $17.95 and when we get response from Authorize.net we are getting price as $-99.05 and hence payment is declined.

We have also used PayPal for payment method and it is working fine and giving proper amount for same product.

How can we solve this issue?

  • Did you set the valid Maximum and Minimum charge amount in the security settings in control panel ? – Mohit Wadhwa Apr 6 '18 at 6:58
  • Yup auth.net all settings are done. We are already using same API Login ID and Transaction Key on other dev site. – Arpi Patel Apr 6 '18 at 7:11
  • What version of the Authorize.Net module? Have you already created an issue for this on drupal.org? – Ryan Szrama Apr 7 '18 at 23:14
  • We are using version 7.x-1.4 for Authorize.Net module. I have asked Module developer for the same support but no response yet. drupal.org/project/commerce_authnet/issues/2958756 – Arpi Patel Apr 9 '18 at 5:36

I got the solution of this issue.

When we were working in local we have removed orders from CMS before moving database to Dev site. But because of dependency some orders were not removed completely. When Authorize.net finds such orders it has treating them as pending order and was adding payment in new order as Unknown payment method. enter image description here

Some how this was adding extra amounts to final payment of new orders and was creating negative amount.

To resolve this I have deleted all my dummy orders from CMS and also from Table "commerce_payment_transaction".

This has resolved my issue.
One of the Drupal's Stackexchange answer helped me to resolve this issue, Why would just adding a product to cart create a payment with method type "unknown" and credit card of "4111--------1111"

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.