Amazon Payments - foxycart's handling of pending / failed payments

xcorlettxcorlett Member
in Help edited September 2013
We added Amazon Payments as an option on checkout, and payments have been processing just fine. However, it doesn't seem to handle pending or failed transactions very well.

If Amazon marks a payment as pending, the customers receipt says
- "Your payment is pending. You will receive an email confirmation once your payment is confirmed."
- and "Your Amazon payment reference is: xxxxxxxxxxxxxxxxxxxx".

Since we assume that the receipt means a successful order, we customize the receipt to say something like "thank you for your order, it will be shipping soon".

Then, if Amazon is unable to charge the card for some reason it will mark the payment as failed. The billing name on the order is then automatically amended by foxycart to read "Joe Bloggs (REJECTED)", but it still shows up as an order. We use Order Desk, which then downloads it as a normal order. The whole process is enough to fool us into thinking that everything is okay and that we should ship it.

Can the process be modified so that the customer doesn't see the regular receipt, is informed that their payment is pending, and that if it then fails it is not downloadable as an unshipped order?

Thanks!
Robert
Comments
  • lukeluke FoxyCart Team
    Hello @xcorlett.

    It sounds like you may want to modify your receipt template to check if the payment is pending before showing that message to your customers. Something like this:
    {% if payment_is_pending %}
    Your order is still pending.
    { % else %}
    We'll ship it soon.
    { % endif %}
    

    As for Order Desk downloading the order as a "normal" order, is the Status of the order not clear? I think we worked with @sparkweb to ensure the status information is part of that process. Hopefully Order Desk can be modified to ensure those entries don't get confused with properly completed transactions.

    Does that help?
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Here's what Order Desk does:

    1. If the status is "pending" Order Desk ignores the datafeed/import
    2. If the status is "rejected" it adds " (REJECTED)" to the last name to make it very clear that the order has been rejected. The order is imported, though, so that you can follow up with the customer for alternate payment. It's important to note that these orders should not be fulfilled.
    3. If the status is empty or successful, the order will be imported like normal.

    I realize that adding " (REJECTED)" to the last name might not be completely ideal. I will have a better solution for automatically handling these orders with the next version of Order Desk.
  • xcorlettxcorlett Member
    edited September 2013
    Luke,

    Awesome, couldn't have asked for a better answer. I didn't realize the power of twig!

    In case anyone is currently using the Order Desk>Shipworks connector, you can use something like the following in your Shipworks grid templates to automatically detect an order with a rejected payment:

    <xsl:variable name="bill_lastname" select="../Address[@type='bill']/LastName"; />
    <xsl:choose>
       <xsl:when test="contains($bill_lastname,'Rejected')"> 
           insert some code or text here to modify the appearance of the order in shipworks
       </xsl:when>
    </xsl:choose>
    

    Robert
  • xcorlettxcorlett Member
    edited September 2013
    & thank you David @sparkweb. I can't wait for Order Desk 2, it is going to be great. Really hope there will be an API :-)
Sign In or Register to comment.