cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the payment methods of a store

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

how to get the payment methods of a store

hello there,

 

i am new in magento and i need some help. i have a website in magento with 10 stores on it. some stores have online payment, some not. now my question is: how to check stores programmatically if they have online payment.

 

the logic is:

foreach ($stores as store){

    if(store.hasOnlinePayment == true){

         //do something

    }

}

if there is something that you don't understand, ask me.

 

greetings.

2 REPLIES 2

Re: how to get the payment methods of a store

@genci_mpl you should get active payment method by using below code.

$payments = Mage::getSingleton('payment/config')->getActiveMethods();

Cheers

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.

Re: how to get the payment methods of a store

hello again,

 

i think you didn't understand me or i haven't described it good. so, all i want is the code to check if a store has paypal payment active (if the store can do paypal payment).

 

something like this:

 

if(storeId->hasPaypalActive == true){

    //do something

}

 

i think it is simple. i have searched a lot but i haven't found something.

 

greetings.