• Resolved mercurydan

    (@mercurydan)


    I have been getting transactions with $0 from paypal sometimes and woocommerce is classifying it as Processing when the order was meant to be $132 but it only calculated $0. This happens randomly as other Paypal payments go through. I have nothing in the error logs to suggest there is something wrong. I checked our paypal account and nothing has come through either for that particular order. I have got paypal orders before and after which were successful however.

    Is this something to do with JS or CSS or browser problems?
    How do I diagnose this issue?

    Thank you

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mercurydan,

    I am not sure I follow. I have a couple questions that will hopefully clarify.

    1. So you have an order that has a total of $132 in WooCommerce. Is there a transaction ID associated with the order and if so when you look it up in Braintree does it have the correct total?

    2. You checked your PayPal account and you don’t see the order. Can you try checking in Braintree using the transaction ID?

    Kind Regards,

    Thread Starter mercurydan

    (@mercurydan)

    Mr Clayton.

    There is no transaction ID from Braintree. Just an Order ID from Woocommerce saying that the Order is Processing.

    When looking at the JS errors at the frontend using firefox Console

    Errors
    1. ppxo_unhandled_error (paypal-checkout.js:254:102)
    2. Error: [paypal-button] Context type iframe requires an element selector ( paypal-checkout.js:6552:83)

    Warning
    1. Use of Mutation Events is deprecated. Use MutationObserver instead.

    This is on a staging site turning off caching plugin SG Optimizer and many other plugins and changing the theme from Astra to Storefront. Both themes are the same.

    Plugin Author Payment Plugins

    (@mrclayton)

    @mercurydan,

    If there is no transaction ID in Braintree then that means the order was never charged in Braintree. Are you 100% sure that it is our plug-in associated with these orders?

    Do you maybe have another payment gateway enabled?

    That JavaScript error isn’t anything to be worried about. It would not interfere with any of the plug-ins functionality.

    Thread Starter mercurydan

    (@mercurydan)

    Mr Clayton,
    Like I said it doesn’t happen all the time, maybe 1 out of 10 paypal orders, which makes it annoying to problem solve. It used to give me $0 transactions and also no names or addresses so I couldn’t follow up the client. Ive been cleaning up the database as much as possible and since then this is the first one, which also started giving me the address and details.

    But from Woocommerce/Settings/Payments I only have these highlighted as payment options.

    Braintree CC Gateway – Credit Card
    Braintree PayPal Gateway – PayPal

    This may relate to my other problem I put in a support for with credit cards.

    “I keep getting this error and the payment is logged in orders as “Failed”.

    “Error processing payment. Reason: Customer does not have any credit cards.”
    “Validation Error 91511 Customer does not have any credit cards.”
    There is a Paypal built into Woocommerce but it is not highlighted as an option. ”

    The website is https://www.elektramagnesium.com.au

    Thank you
    Daniel

    Thread Starter mercurydan

    (@mercurydan)

    Could it be something to do with Browser caching or the users OS?
    I found out that the user gets to the Thank you page after clicking Pay

    In Paypal options the transaction Type = Capture
    Could there be something that makes it mis-communicate and set to Authorise?

    I have had issues with the sandbox paypal website where it doesn’t allow an address then it does after a number of clicks and the sandbox website seems pretty slow to load.

    Im grasping at straws because I dont know how Paypal can tell Woocommerce that the transaction was fine when it wasn’t.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mercurydan,

    For the orders marked as processing, I don’t believe PayPal is telling WC that the transaction is fine because the transaction is never being sent to Braintree/PayPal in the first place.

    If our plugin’s process_payment function is called, then there will be some kind of indicator on the order in the form of order notes that tell the story of what happened to the order. If there aren’t any order notes and there is no transaction ID, that means WC’s code ever called our plugin. It sounds to me like you have a hard to re-create scenario where a customer’s request isn’t submitted via ajax to the checkout page and they are instead immediately redirected to the thank you page, skipping all order processing.

    There’s some evidence to suggest it’s a JS error being thrown at the time the Place Order button is clicked. That could prevent the nonce from Braintree being returned which would explain the 91511 error code you sometimes see.

    I’ll take a look at your checkout page and see if there is anything obvious.

    Plugin Author Payment Plugins

    (@mrclayton)

    @mercurydan,

    The only thing I can see is that you are using a pretty aggressive caching scheme. Maybe try white-listing our plugin’s scripts from the cache and see if that helps at all.

    Any updates on your end?

    Kind Regards,

    Thread Starter mercurydan

    (@mercurydan)

    Mr Clayton,
    Ill just uncheck Minify JS, wait till it happens again, then try unchecking other things in the Caching system like Render blocking JS to test it over time.
    Im doing what I can to record debug logs, remove errors and warnings from the frontend. Hopefully I randomly fix it in time or the updates in your plugin help at some point.

    But you might be right about the caching system. I have started with using every CDN tool and caching option available then trying to reduce it so the site doesn’t break.

    If I find a way to replicate the problem Ill let you know.

    Thread Starter mercurydan

    (@mercurydan)

    Mr Clayton,
    I have another issue that popped up now that seems related. There are obviously problems with the way the payment gateway talks to WC. This was a credit card though and not paypal.

    Error processing payment. Reason: Cannot provide both payment_method_token and customer_id unless the payment_method belongs to the customer.

    I looked it up and its error 91516
    “If you specify both a customer ID and a payment method token when creating a transaction, the payment_method_token must belong to the customer ID.”

    How could this happen?

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @mercurydan,

    The only way that can happen is if you cleared your Braintree Sandbox environment or you have multiple gateways and entered keys from one gateway into a site that was using another set of keys.

    1. Whenever a customer ID is created in Braintree the API keys tell Braintree which gateway to associate the customer with. If you have multiple gateways and you switched keys, Braintree receives that customer ID and tries to match it with the gateway specified by your keys. If it doesn’t find it you get that message.

    2. You’re testing in Sandbox and you clear out your Braintree sansdbox data. It’s cleared in Braintree but that doesn’t mean all the usermeta data in WordPress is cleared. It still contains the customer ID’s that mapped to Braintree.

    To resolve with the user you’re trying to accept payments as, navigate to the user’s profile page within the WordPress admin. Scroll down and you will see their Sandbox and Product Braintree vault ID’s. Delete it and save.

    Adding to the previous points, someone could be attempting to enter payment tokens in an attempt to charge another card. Our plugin requires that the customer ID match the payment token which is a security measure preventing this kind of behavior.

    Kind Regards,

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Paypal $0 Transactions sometimes’ is closed to new replies.