/leanpay-payment-gateway-cscart-addon

LeanPay payment gateway (CS-Cart 4.10.x - 4.11.x addon)

Primary LanguagePHP

LeanPay payment gateway (CS-Cart addon)

http://docs.leanpay.si

The addon require manually set up of cron job, to synchronize installment plans from LeanPay API.

0 */12 * * * curl "http://yourdomain.com/index.php?dispatch=leanpay.fetch" > /dev/null 2>&1

How to integrate into template

  1. Inside your "design/themes/NAME_OF_YOUR_THEME/templates/common/product_data.tpl", add the following code
{capture name="leanpay_payment_`$obj_id`"}
    {if $product.leanpay_installments}
    
        <span class="cm-reload-{$obj_prefix}{$obj_id}" id="leanpay_payment_update_{$obj_prefix}{$obj_id}">
            <ul class="installments" data-price="{$product.price}">
                {foreach from=$product.leanpay_installments item=installment}
                    <li>polog	<strong>{$product.leanpay_downpayment|string_format:"%.2f"}€</strong> + {$installment.months} x <strong>{$installment.installment|string_format:"%.2f"}€</strong></li>
                {/foreach}
            </ul>
        <!--leanpay_payment_update_{$obj_prefix}{$obj_id}--></span>
        
    {/if}
{/capture}

{if $no_capture}
    {assign var="capture_name" value="leanpay_payment_`$obj_id`"}
    {$smarty.capture.$capture_name nofilter}
{/if}
  1. Inside your "design/themes/NAME_OF_YOUR_THEME/templates/blocks/product_templates/default_template.tpl find
{$smarty.capture.$list_discount nofilter}

and add after it the capture to display the installments

{assign var="leanpay_payment" value="leanpay_payment_`$obj_id`"}
{$smarty.capture.$leanpay_payment nofilter}