Jump to content

How to disable a payment gateway for a customer?


Remitur

Recommended Posts

Does exist any way to enable or disable a payment gateway for a user?

I.e.:

  • I have three gateways: paypal, banktransfer, stripe
  • for user A, I would like to be available just paypal and banktransfer 
  • for user B, instead just banktransfer and stripe

(note: A and B may be filtered according to country, or on a custom field... it doesn't matter, there're a number of different ways to do this filter. What I'm looking for is a way to temporarly disable a gateway for a customer in client area, in order to make impossible for him to use it)

 

 

Edited by Remitur
Link to comment
Share on other sites

5 minutes ago, Remitur said:

Does exist any way to enable or disable a payment gateway for a user?

not from settings - you could do it with hooks.... although you might need multiple hooks to cover all eventualities, e.g....

  • remove unwanted gateways from cart.
  • remove unwanted gateways from invoices.

the first is relatively simple and i've posted multiple gateway hooks that can do that based on various conditions...

the second can be an absolute pain with older versions, though I would imagine it's easier with recent versions using 21 (or child of).

Link to comment
Share on other sites

6 minutes ago, brian! said:

not from settings - you could do it with hooks.... although you might need multiple hooks to cover all eventualities, e.g....

  • remove unwanted gateways from cart.
  • remove unwanted gateways from invoices.

 

Wonderful! It's exactly what I was looking for!

(Note: definitely, this community needs a better search engine... just to find your precious previous posts! 😄 )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated