Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Nielsen 153 posts 810 karma points
    Nov 10, 2023 @ 08:44
    Michael Nielsen
    0

    PaymentMethod cached on client?

    We have a client who wanted to switch from Nets Easy payment gateway to Quickpay.

    We had Vendr.Contrib.PaymentProviders.Nets 2.0.0 installed, so we installed Vendr.Contrib.PaymentProviders.QuickPay 2.0.1.

    We set up a new payment method for Quickpay and set it as default payment method on the country (there is only 1 country, Denmark, in the shop).

    Everything works fine, we are sent to Quickpays payment gateway when going through the checkout.

    We still had some orders coming in, that had Nets Easy payments, so I remembered, that could be carts created before the change, so I changed the paymentmethodId on all carts in the database.

    However the client and some customers are still sent to Nets Easy, and that is with newly created carts and orders.

    I cannot recreate it, no matter what I do.

    I advised the client to try and delete cookies and caches in their browser, which seems to have done the trick for him.

    So I'm wondering if the payment method somehow get's cached on the client? And what could be done to fix that?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Nov 10, 2023 @ 13:54
    Matt Brailsford
    100

    I guess it will depend on the logic in place for setting the current payment method. There is a DefaultPaymentMethod stored in the session manager, which means its stored in a cookie. If you are relying on this then yea it's possible that old customers who have a cookie set could be remembering the old default payment method.

    You could probably get around this by adding code that updates the default payment method if it's set to the old id

  • Michael Nielsen 153 posts 810 karma points
    Jan 05, 2024 @ 09:56
    Michael Nielsen
    0

    There is only logic to change the PaymentMethod.

    There isn't anything that sets PaymentMethod as default, as I figure that would be redundant, when having a setting for this on countries.

    But yes, if this is stored in a cookie, then that would probably be the issue.

    We handled it by adding logic for setting the default payment method when carts are created.

Please Sign in or register to post replies

Write your reply to:

Draft