2

We have the Payment Method Example module turned OFF. And, we only have one payment type set up (Authorize.net) in the Enabled Payment Method Rules.

Yet, when we add just one product to the cart and click submit (without going to checkout, so without filling in any payment fields) we can go to orders/shopping cart and see that a payment with the following fields has been added to the order in process:

Date: "6/25/2015" (even though today is 6/22/2016) Method: "Unknown" Remote ID "-" Result Message: - Number: 4111--------1111 Expiration: 06/2015 Amount: $1,788 (which is $4.00 less than the total for this particular order. Note that this amount will vary, though.)

This causes the following Authorize.net issues:

1) In the above example, Authoize.net comes in and accepts a transition for $4.00. The order balance is then zero, based on the above $1,788 "unknown" payment plus the $4.00 from Authorize.net.

OR

2) Authorize.net comes back with the below error when the "Unknown" method payment is larger than the actual order:

REJECTED: A valid amount is required. AVS response: AVS not applicable for this transaction CVV match: -

If it helps, here are the rules that fired on the product submit page:

Commerce Pricing Attributes (default) Calculate taxes: Sales tax (default) Calculate taxes: VAT (default) Reset the cart order status on product add or remove (default) Add to Cart message (overridden) Redirect after product add to Cart (custom) - a page redirect after submit

So - I need some help to debug/fix this:

1) Is there anything obvious I should look at? I have analyzed the setup of all modules, rules, etc.

2) How would what looks like an example payment type be added before even going to any checkout page - when we have the Payment Method Example module turned OFF.

3) And, since there is no error message - where do I even begin to debug this (I am a novice)?

4) Will Devel help? It seems you need some code added to a module. How do I figure out what module, what code, and where to add the code?

Thanks! Any help you can give would be highly appreciated!

  • Were there any uncompleted test orders made by your user account still in the database? Sometimes Commerce attempts to link these to your basket and gets it wrong. – Alfred Armstrong Jun 22 '16 at 14:39
  • If I recall right, that credit card number is a test number that fits the auto card number validator but is not a real card. Sounds like you have a test harness active somewhere. 1) go through all the rules that are on the site, even if they should not be firing. 2) grep your doc root grep -nr "4111" ./* – DeveloperWeeks Jun 22 '16 at 14:42
  • Thanks Alfred! I deleted all orders/shopping carts that were created before we went live (ie - when the Payment Method Example might have been turned on). But - I am still seeing the unknown payment being applied when a product is added. I will start analyzing the rules now... Thanks again! – DrupalNovice Jun 22 '16 at 16:09
0

Fixed it!

When you delete an order on the order page, the associated payment does NOT get deleted. And, once the order is deleted, there is no way to delete the payment in Drupal commerce, since you only have a view of the orders.

Then, when you create a new order, the order number you deleted can get 'reused'. So, the old payment is then associated with this new order. That is why we saw the errant payments on the new orders.

So, I fixed this issue by going into the database and manually deleting all of the errant example payments in the commerce_payment_transaction table. So far, so good….

Bottom line: NEVER delete an order once live. Or, minimally, always delete the order's payment FIRST, then the order.

  • Note - this issue should be resolved in the future once the patch is created that disallows the deletion of orders if they have payments. See drupal.org/node/1208896 – DrupalNovice Jun 30 '16 at 17:28

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.