Transaction failed; datafeed sent anyway

oskayoskay Member
in Bugs & Feature Requests edited September 2014
This morning, a customer attempted to place an order at our store (FoxyCart v 1.1).

The payment method was Amazon FPS.
Amazon's site reports to us that it was a credit card transaction with "Status: Failed."


The FoxyCart transaction ( # 389481355 ) is listed in the "Transactions" report, rather than the "Error log." The customer's receipt page says
"Your payment is pending. You will receive an email confirmation once your payment is confirmed."


Our transaction report says "Status: rejected
Note: This transaction is not complete and is still pending according to your hosted payment provider.
XML Datafeed Status: Processed."

And indeed, the datafeed was processed. On our backend, the consequence was that the order was deducted from inventory, a packing slip was printed, and it was delivered to our shipping desk to pick and ship. This is not good; We very easily could have shipped the order. We would have, had I not happened to notice that there wasn't a separate Order Confirmation message from FoxyCart.


It seems to me that this is a state that should not be allowed. When a transaction is fully approved, I expect the following 3 - 4 events to be triggered:

* The Order Confirmation message is sent
* The datafeed is sent
* FoxyCart increments its completed transaction count for billing purposes
* Transaction added to transaction report. (Shouldn't it be in a separate "Pending Transactions" report until it's approved?)


And, if it hasn't been approved, exactly *none* of those things should happen. Otherwise, it's painfully easy to end up with a case like ours where a non-order gets picked for shipping.



Note added: This is actually the second time that this has happened. Order # 318105381 on July 5 had the same issue.
Comments
  • fc_adamfc_adam FoxyCart Team
    @oskay,

    That is actually the expected behaviour. The datafeed that you would have received would have included a status node of "pending", and if the transaction completed, you would have received another datafeed for that transaction with a node containing "approved", but as it was rejected, you would have received a second datafeed with a status node of "rejected".

    Looking at our documentation for Amazon FPS, unfortunately that's not documented at all, so there isn't any way you would have known that - I'm really sorry about that.

    The idea for handling these datafeed's is that if the transaction is for Amazon FPS, to make sure that the status node is indeed set to "approved" before actioning anything with that datafeed. If you needed to perform actions for pending transactions, and undo them if the order is rejected, you can do that too.

    I'll work on updating our documentation for Amazon FPS now.
Sign In or Register to comment.