Neu How to create payment method plugin for JTL Shop?

FPrüfer

Moderator
Mitarbeiter
19. Februar 2016
1.777
468
Halle
Hi,
a simple payment plugin implements at least one payment method. For JTL-Shop4 create a plugin structure like this:
Code:
your_plugin_id
  info.xml
  - version
    - 100
      - paymentmethod
        - class
           SimplePayment.class.php
        - template
           simplepayment.tpl
info.xml
XML:
<?xml version='1.0' encoding="ISO-8859-1"?>
<jtlshop3plugin>
    <Name>Simple Payment-Plugin</Name>
    <Description>Simple Payment-Plugin for JTL-Shop</Description>
    <Author>Your Name</Author>
    <URL>http://your-website.com</URL>
    <XMLVersion>100</XMLVersion>
    <Shop4Version>406</Shop4Version>
    <PluginID>your_plugin_id</PluginID>
    <Install>
        <Version nr="100">
            <CreateDate>2019-11-11</CreateDate>
        </Version>
        <PaymentMethod>
            <Method>
                <Name>Simple Payment</Name>
                <PictureURL />
                <Sort>1</Sort>
                <SendMail>1</SendMail>
                <Provider>Simple Paymentprovider</Provider>
                <TSCode>OTHER</TSCode>
                <PreOrder>1</PreOrder>
                <Soap>0</Soap>
                <Curl>0</Curl>
                <Sockets>0</Sockets>
                <ClassFile>class/SimplePayment.class.php</ClassFile>
                <TemplateFile>template/simplepayment.tpl</TemplateFile>
                <ClassName>SimplePayment</ClassName>
                <MethodLanguage iso="GER">
                    <Name>Simple Payment</Name>
                    <ChargeName>Simple Payment</ChargeName>
                    <InfoText>Simple Payment for JTL-Shop</InfoText>
                </MethodLanguage>
            </Method>
        </PaymentMethod>
    </Install>
</jtlshop3plugin>
SimplePayment.class.php
PHP:
<?php
/**
 * @copyright (c) JTL-Software-GmbH
 * @license       http://jtl-url.de/jtlshoplicense
 */

require_once PFAD_ROOT . PFAD_INCLUDES_MODULES . 'PaymentMethod.class.php';

/**
 * Class SimplePayment
 */
class SimplePayment extends PaymentMethod
{
    /**
     * @param Bestellung $order
     */
    public function preparePaymentProcess($order)
    {
        parent::preparePaymentProcess($order);

        /* do something with order to pay now... */
    }
}
Thats it... ;)
 
Ähnliche Themen

Ähnliche Themen