WordPress.org

Ready to get started?Download WordPress

Forums

eShop
Quantity control doesn't work with simultaneous orders (19 posts)

  1. c77m
    Member
    Posted 2 years ago #

    It appears that visitors can add items to their cart at the same time, even if there is insufficient quantity. The quantity available isn't reduced until the payment is complete (at least with PayPal IPN), so if two people submit orders about the same time, it is possible for the quantity available to go down to -1. (As a result, we oversold a number of items and had to provide refunds and explanations to upset customers.)

    Additionally, when a customer submits payment via PayPal eCheck, the order should be successful but the IPN message from eShop indicates a failed payment. The order is marked as failed, and the quantity is not deducted. So we have at least one customer whose payment will come through successfully, but what he ordered will be sold out before the payment completes. We have a few days to wait before we see what happens after PayPal completes the payment, whether or not eShop will deduct the item from stock or not (which is already below 0, thanks to the aforementioned problem.)

    http://wordpress.org/extend/plugins/eshop/

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    The quantity available isn't reduced until the payment is complete

    Correct.

    when a customer submits payment via PayPal eCheck, the order should be successful but the IPN message from eShop indicates a failed payment.

    There are a number of possible reasons for this:

    1. The customer abandoned or did not complete the transaction at PayPal
    2. PayPal just hasn't got around to contacting eShop yet (we've known it take up to 4 days).
    3. PayPal cannot contact eShop due to a misconfiguration in your PayPal settings at PayPal or within eShop.

  3. c77m
    Member
    Posted 2 years ago #

    There are a number of possible reasons for this:

    The customer did complete the transaction (via echeck, which took a few days to clear). Paypal did contact eShop immediately (eShop said it was a failed payment, which it wasn't).

    There appears to be a fourth possibility that eShop doesn't properly process Paypal eCheck payments if it's not an instant payment.

    The IPN from Paypal is below, which shows that it notified eShop and was successfully paid:

    mc_gross: 10.00
    protection_eligibility: Partially Eligible - INR Only
    address_status: unconfirmed
    item_number1: 2012 : Men s Large
    payer_id: [DELETED FOR POSTING]
    tax: 0.00
    address_street: [DELETED FOR POSTING]
    payment_date: 09:51:33 May 16, 2012 PDT
    payment_status: <strong>Completed</strong>
    charset: windows-1252
    address_zip: 67203
    mc_shipping: 0.00
    mc_handling: 0.00
    first_name: [DELETED FOR POSTING]
    mc_fee: 0.52
    address_country_code: US
    address_name: [DELETED FOR POSTING]
    notify_version: 3.4
    echeck_time_processed: 16:55:41 May 21, 2012 PDT
    custom: [DELETED FOR POSTING]
    payer_status: verified
    business: [DELETED FOR POSTING]
    address_country: United States
    num_cart_items: 1
    mc_handling1: 0.00
    address_city: Wichita
    verify_sign: [DELETED FOR POSTING]
    payer_email: [DELETED FOR POSTING]
    mc_shipping1: 0.00
    tax1: 0.00
    txn_id: 27751510V9152191S
    payment_type: echeck
    last_name: [DELETED FOR POSTING]
    address_state: KS
    item_name1: [DELETED FOR POSTING]
    receiver_email: [DELETED FOR POSTING]
    payment_fee: 0.52
    quantity1: 1
    receiver_id: [DELETED FOR POSTING]
    txn_type: cart
    mc_gross_1: 10.00
    mc_currency: USD
    residence_country: US
    transaction_subject: [DELETED FOR POSTING]
    payment_gross: 10.00
    ipn_track_id: [DELETED FOR POSTING]

    Unfortunately this payment, like several others, went through after we were sold out of stock, because eShop allowed the stock to be purchased even though there were pending orders for the same items.

    The only way I can see to avoid the stock quantity problem in the future is to tell eShop that we have 5-10% fewer items than we actually have. Otherwise we'll have to keep refunding customers their payments, which is a pain for us and leaves us with unhappy customers.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    The only way I can see to avoid the stock quantity problem in the future is to tell eShop that we have 5-10% fewer items than we actually have.

    And that is exactly what we recommend.

  5. c77m
    Member
    Posted 2 years ago #

    And that is exactly what we recommend.

    It would be awesome to see stock control that works, rather than having to not be able to sell everything you might want to sell. Just sayin'... :)

    In a perfect world, when someone adds an item to their shopping cart (limited quantity items only), the number of available stock would be reduced by what is in the shopping cart. If the order is not completed in a certain amount of time (30 minutes? 60 minutes? 24 hours?), the shopping cart would be emptied and items returned to available stock.

    It should be easy enough to respond to the IPN saying that it is not a valid transaction if it has passed a set expiration time. (But maybe the incorrectly handled eCheck IPNs indicate there is already mishandling of IPNs??)

    On the other hand, if there isn't enough demand for accurate handling of transactions, then it would just be nice if the features description ("Basic Stock Control") was a little more honest (e.g.: "Partially-working Basic Stock Control")

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    We have known take 4 days for PayPal to send out a successful transaction code.

  7. c77m
    Member
    Posted 2 years ago #

    I think you must not have read my posts. The problem isn't PayPal, the problem is when PayPal sends the successful IPN, eShop can't handle it properly.

    An IPN that reports payment_status: Completed should never cause eShop to report Paypal IPN -A Failed Payment Ref:XXXX

    People are relying on eShop for financial transactions. If eShop refuses to acknowledge problems that clearly exist, then people should know that eShop doesn't care about the integrity of transactions.

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    You are free to use another plugin but eShop has over 100,00 users - most of whom are using PayPal without any problem.

  9. c77m
    Member
    Posted 2 years ago #

    This is why I clicked the "Support" tab and started asking questions... for support.

    PayPal is working fine. eShop is not. Can you help me find out why? Or do you just want to mark the post "resolved" again without acknowledging there's a problem that may be putting "100,00 users" at risk?

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    There are no issues with the current version of eShop & PayPal.

  11. c77m
    Member
    Posted 2 years ago #

    Can you please tell me how an eShop transaction is successfully processed through PayPal, but eShop then says the transaction is "failed"?

    I've provided copious amounts of detail. Please advise.

    I'm not trying to be an ass.. I'm trying to solve a problem that is NOT resolved.

  12. esmi
    Forum Moderator
    Posted 2 years ago #

  13. c77m
    Member
    Posted 2 years ago #

    http://quirm.net/wiki/eshop/troubleshooting/invalid-failed-payments/

    This refers to a merchant gateway reporting an invalid or failed payment, which is not my problem. (Please note in above posts, Paypal reports SUCCESS.)

    http://quirm.net/wiki/eshop/troubleshooting/transaction-remains-pending/

    This refers to transactions that remain pending. This is not my problem. (Please note above posts, after Paypal reports success eShop moves the transactions to Failed.)

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    This refers to a merchant gateway reporting an invalid or failed payment

    No. Try reading it again.

    fter Paypal reports success eShop moves the transactions to Failed.

    Your merchant gateway cannot contact eShop due to a misconfiguration in your settings — either within your gateway account or within eShop. Re-check all of your gateway settings — both in eShop and within your merchant gateway account.
    http://quirm.net/wiki/eshop/troubleshooting/invalid-failed-payments/

    Your merchant gateway cannot contact eShop due to a misconfiguration in your settings within your merchant gateway account or within eShop.Re-check all of your gateway settings —- both in eShop and within your merchant gateway account
    http://quirm.net/wiki/eshop/troubleshooting/transaction-remains-pending/

  15. c77m
    Member
    Posted 2 years ago #

    Your merchant gateway cannot contact eShop...

    I believe PayPal contacted eShop fine, but maybe you can help me understand what happened with this particular order...

    The order was entered through eShop on 16-May @ 16:50. One minute later the first notification came through and said:

    An instant payment notification was received
    
    from [buyer.email] on 05/16/2012 at 4:51 PM
    
    Details:
    http://the.website/wp-admin/admin.php?page=eshop-orders.php&view=31&eshop
    The transaction was not completed successfully. eShop could not validate the order.The transaction was not completed successfully at Paypal. The pending reason for this is echeck

    Paypal did process the payment, and the echeck took 4 days to clear. (I was concerned about it being marked as Failed instead of Pending, but I didn't touch the order just in case..) When the payment cleared, PayPal appears to have initiated an IPN, and eShop sent the following notification:

    An instant payment notification was received
    
    from [buyer.email] on 05/21/2012 at 11:55 PM
    
    Details:
    http://the.website/wp-admin/admin.php?page=eshop-orders.php&view=31&eshop
    The transaction was not completed successfully. eShop could not validate the order.

    My guess would be that eShop couldn't validate the order because it was marked as failed when the eCheck first went through. But I don't know the back-end process and I'm sure there are other possibilities..

    What is the expected behavior from eShop when a PayPal IPN reports "payment_status: Pending", as in the first notification?

  16. esmi
    Forum Moderator
    Posted 2 years ago #

    I believe PayPal contacted eShop fine

    And based on working and developing eShop for almost 5 years, I can tell you - categorically - that it did not.

    One minute later the first notification came through

    That and your subsequent emails were from PayPal and have no direct relationship with the ability of your site to communicate with PayPal.

    What is the expected behavior from eShop when a PayPal IPN reports "payment_status: Pending", as in the first notification?

    eShop leaves the order in Pending for up to 4 days - after which time it is moved to Failed,

  17. c77m
    Member
    Posted 2 years ago #

    (In the interest of trying to be as productive as possible, I'm playing dumb at this point and will ask some stupid questions... it's meant to identify where things are going wrong, no disrespect intented.)

    That and your subsequent emails were from PayPal and have no direct relationship with the ability of your site to communicate with PayPal.

    The emails originated from my dreamhost server per the headers, and at the bottom of each is the text: Regards, Your friendly automated response., which seems to be coming from eshop/paypal.php line 382:
    382 $body .= "\n\n".__("Regards, Your friendly automated response.",'eshop')."\n\n";

    This looks like it is certainly coming from eShop, and contains Paypal transaction information - so there must be communication happening somewhere. (The emails that originate from paypal are going to our primary paypal email address, which configured in eShop Gateways tab but these emails are from the "eShop From email address" configured in eShop general settings.)

    eShop leaves the order in Pending for up to 4 days - after which time it is moved to Failed

    Something is triggering the wrong action here, whether it's something I have misconfigured or something else.. Because after I receive the above email from my webserver, the transaction was moved immediately to Failed. Something happened within ~60 seconds of Paypal accepting the order that caused it to be marked Failed.

    I will start looking at the code to see if I can better understand the steps and the order they are taken so I can be more helpful in trying to identify where the problem occurs.

  18. c77m
    Member
    Posted 2 years ago #

    Here is the bit of code in paypal.php that appears to cause the transaction to change to Failed.. It looks for Paypal to report status of "Completed" or "Refunded", otherwise it fails the transaction. So when PayPal's IPN said the status was "Pending", eShop failed it.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    If eChecks via PayPal are working for other people, does this mean I have something configured incorrectly such that PayPal sends this Pending message when it shouldn't?

  19. elfin
    Moderator
    Plugin Author

    Posted 2 years ago #

    don't allow echecks, eShop doesn't handle them.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.