Jump to content

How to show or hide a payment method from payment module...


Recommended Posts

I have written a payment module for the PSP we are using however part of the requirement is that his method only be used for whitelisted customers.

 

So I am thinking of doing the following:

 

1. Create a group called whitelist or provide a list of accepted id's in the payment form.

2. In the payment option, if the user belongs to the whitelist group, show the payment option, if not, hide it.

 

The critical part is show or hide the payment module...

 

Is this possible to do from a module? If not, then all I am currently doing is setting the "return $htmlOutput;" to empty which removes the option to click "Pay Now" from the invoice.

 

Any ideas as to a best method on how to do this?

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