I'd like to add in some rules for the 'Payment Information' section of the Magento Onepage Checkout.

Currently my site will show the options:

  • Debit/Credit Card
  • PayPal
  • Invoice Organisation

I'd like to only show the 'Invoice' option if they have selected a particular option within the Billing Payment section.

Which file should I edit to access the options within the Payment Section on the onepage checkout? Can anyone point me in the right direction?

2 Answers 2


Theres a really handy event for disabling and enabling payment methods on the fly.

Add the following into your config.xml section


Then create the following function in your observer.php

 * Disable all other payments
 * @param Varien_Event_Observer $observer
public function invoiceOnly(Varien_Event_Observer $observer) {

    $_result = $observer->getResult();
    $_methodInstance = $observer->getMethodInstance();

        if($_methodInstance->getCode() != 'METHOD_CODE') {
            $_result->isAvailable = false;
        } else {
            $_result->isAvailable = true;


You'll need to modify the BILLING_CONDITION_HERE and the METHOD_CODE (to the invoice payment method code)

This will automatically disable everything except METHOD_CODE if the billing condition is met.

  • Dave... awesome :)
    – Zabs
    Commented Jul 4, 2014 at 14:59
  • @Zabs no problem :)
    – Dave
    Commented Jul 4, 2014 at 15:14
  • Thank you. It works fine for my custom logic as well. However, I've got a question about controller_action_postdispatch_checkout_onepage_saveBilling event, which is fired after payment_method_is_active. It's problematic because I'm trying to enable/disable some payment methods depending of user address. Do you have an idea which event should I use after address is saved and before payment methods are displayed?
    – DarkCowboy
    Commented Jun 13, 2017 at 8:24

you can disable

Paypal Payment module


Admin->system->configure->Payment Methods->Paypal

Similarly You can disable credit card from admin:

Admin->system->configure->Saved CC

and select disable option.

  • 2
    The OP is looking to disable payment options depending on user input. This would disable the option entirely.
    – Dave
    Commented Jul 4, 2014 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.