Creating our module structure
Theoretically, we know how to create a payment module, so let’s apply it to our example module. As seen before, we can create the /modules/whcashpayment/
folder containing a logo.png
file, the index.php
file, and the main module class file named whcashpayment.php
.
Our /modules/whcashpayment/whcashpayment.php
file should initially look like this:
<?php use PrestaShop\PrestaShop\Core\Payment\PaymentOption; if (!defined('_PS_VERSION_')) { exit; } class WHCashPayment extends PaymentModule { const CONFIG_OS_WHCASH = 'WH_OS_CASH_VALIDATION'; public function __construct() { $this->name = 'whcashpayment'; $this->tab = 'payments_gateways'; $this->version = '1.0.0'; $this->author = 'Web Helpers'; $this->need_instance...