W
W
WebDev2015-10-28 18:05:44
Magento
WebDev, 2015-10-28 18:05:44

Connecting a payment system in magento?

Hello, I have never used Magenta, tell me how to connect the payment system plugin? I downloaded from here www.magentocommerce.com/magento-connect/alipay-pay... inserted the key into my connect manager, everything downloaded. Set up. How do I now display their button on the checkout page?
The following code is used there:

<ul class="checkout-types">
        <?php foreach ($this->getMethods('methods') as $method): ?>
            <?php $methodHtml = $this->getMethodHtml($method); ?>
            <?php if ($methodHtml): ?>
            <li><?php echo $methodHtml; ?></li>
            <?php endif; ?>
        <?php endforeach; ?>
        </ul>

Where $this->getMethods('methods') as I understand it returns the available payment methods. But it doesn't return the method I connected.
And here is the code:
$payments = Mage::getSingleton('payment/config')->getActiveMethods();
    $payMethods = array();
    foreach ($payments as $paymentCode=>$paymentModel)
    {
        $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');
        $payMethods[$paymentCode] = $paymentTitle;
    }

It will also return my method, and as Google says, the last code just returns a list of active payment methods.
How to display it on the checkout page?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Batishchev, 2015-11-03
@z0rg

If the module is made correctly and everything is set up, then no shamanism with the code is needed and the method should appear when choosing a payment method, possibly in a different style if you have a custom design.

I
Ivan Cherny, 2015-12-01
@paalomnik

just enable the module in its settings, usually this is the Enabled / Is Enabled item

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question