PHP Classes

File: get_payment_methods_codes.php

Recommend this page to a friend!
  Classes of Victor Andeloci   Useful Magento Scripts   get_payment_methods_codes.php   Download  
File: get_payment_methods_codes.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Useful Magento Scripts
Run product operations in Magento e-commerce sites
Author: By
Last change:
Date: 9 days ago
Size: 516 bytes
 

Contents

Class file image Download
<?php
   
include_once './app/Mage.php';

   
$storeId = 1; // change this to get payment methods based on store id

   
Mage::app()->setCurrentStore($storeId);

   
$allPaymentMethods = Mage::getModel('payment/config')->getAllMethods();
    foreach(
$allPaymentMethods as $paymentMethod) {
        echo
'Method: <b>' . $paymentMethod->getTitle() . '</b><br>';
        echo
'Payment code: <b>' . $paymentMethod->getCode() . '</b><br>';
        echo
'------------------------------------------------------<br>';
    }