Skip to content

Commit

Permalink
sync-up commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BohdanLeasoft committed Sep 5, 2022
1 parent fbe738c commit 85bffab
Show file tree
Hide file tree
Showing 21 changed files with 556 additions and 11 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Magento 2 2.0.5
Magento 2 2.0.6
------------------------------

# Changelog #
Expand Down Expand Up @@ -63,3 +63,7 @@ Magento 2 2.0.5
* Fixed loggers crashing for Magento 2.4.4
* Fixed error while initialization of transaction

## Changes in version 2.0.6

* Fixed datepickers for Magento 2.4.5

4 changes: 2 additions & 2 deletions Model/Builders/ConfigRepositoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ public function getDescription($order, $method): string
$storeId = (int)$order->getStoreId();

$description = ($this->getStoreConfig($path = 'payment/' . $method . '/description', $storeId));
$description = str_ireplace('%id%', $order->getIncrementId(), $description);
$description = str_replace('%id%', $order->getIncrementId(), $description);

$storeName = $this->getStoreConfig(self::XML_PATH_STORE_NAME, $storeId);
$storeName = $storeName ?? __('our shop');
$description = str_ireplace('%name%', $storeName, $description);
$description = str_replace('%name%', $storeName, $description);

return $description;
}
Expand Down
35 changes: 35 additions & 0 deletions Model/Methods/GiroPay.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace GingerPay\Payment\Model\Methods;

use GingerPay\Payment\Redefiners\Model\PaymentLibraryRedefiner;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Framework\Exception\LocalizedException;

/**
* GiroPay method class
*/
class GiroPay extends PaymentLibraryRedefiner
{

/** Payment Code */
const METHOD_CODE = 'ginger_methods_giropay';

/**
* @var string
*/
public $method_code = self::METHOD_CODE;

/** Platform Method Code */
public $platform_code = 'giropay';

/**
* @var string
*/
protected $_code = self::METHOD_CODE;
}
35 changes: 35 additions & 0 deletions Model/Methods/MobilePay.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace GingerPay\Payment\Model\Methods;

use GingerPay\Payment\Redefiners\Model\PaymentLibraryRedefiner;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Framework\Exception\LocalizedException;

/**
* MobilePay method class
*/
class MobilePay extends PaymentLibraryRedefiner
{

/** Payment Code */
const METHOD_CODE = 'ginger_methods_mobilepay';

/**
* @var string
*/
public $method_code = self::METHOD_CODE;

/** Platform Method Code */
public $platform_code = 'mobilepay';

/**
* @var string
*/
protected $_code = self::METHOD_CODE;
}
35 changes: 35 additions & 0 deletions Model/Methods/Swish.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace GingerPay\Payment\Model\Methods;

use GingerPay\Payment\Redefiners\Model\PaymentLibraryRedefiner;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Framework\Exception\LocalizedException;

/**
* Swish method class
*/
class Swish extends PaymentLibraryRedefiner
{

/** Payment Code */
const METHOD_CODE = 'ginger_methods_swish';

/**
* @var string
*/
public $method_code = self::METHOD_CODE;

/** Platform Method Code */
public $platform_code = 'swish';

/**
* @var string
*/
protected $_code = self::METHOD_CODE;
}
3 changes: 3 additions & 0 deletions Model/PaymentConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class PaymentConfigProvider extends ModelBuilderRedefiner
Methods\Afterpay::METHOD_CODE,
Methods\Amex::METHOD_CODE,
Methods\Googlepay::METHOD_CODE,
Methods\GiroPay::METHOD_CODE,
Methods\MobilePay::METHOD_CODE,
Methods\Swish::METHOD_CODE,
];

/**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The ideal online payment page for your webshop:

## Version number

* Latest version 2.0.5
* Latest version 2.0.6

## Requirements:
- PHP v7.0 to v8.1
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "emspay/ems-online-magento-2",
"description": "EMS Pay for Magento 2",
"type": "magento2-module",
"version": "2.0.5",
"version": "2.0.6",
"require": {
"gingerpayments/ginger-php": ">=2.1.0"
},
Expand Down
3 changes: 3 additions & 0 deletions etc/adminhtml/methods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
<include path="GingerPay_Payment::methods/afterpay.xml"/>
<include path="GingerPay_Payment::methods/banktransfer.xml"/>
<include path="GingerPay_Payment::methods/googlepay.xml"/>
<include path="GingerPay_Payment::methods/giropay.xml"/>
<include path="GingerPay_Payment::methods/mobilepay.xml"/>
<include path="GingerPay_Payment::methods/swish.xml"/>
</include>
120 changes: 120 additions & 0 deletions etc/adminhtml/methods/giropay.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ All rights reserved.
~ See COPYING.txt for license details.
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
<group id="ginger_methods_giropay" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1">
<label>GiroPay</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1"
showInStore="0">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/ginger_methods_giropay/active</config_path>
</field>
<field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Title</label>
<config_path>payment/ginger_methods_giropay/title</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="description" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1"
showInStore="1">
<label>Payment Description</label>
<config_path>payment/ginger_methods_giropay/description</config_path>
<comment>Use %id% for Order ID and %name% for Store Name (Set under General > Store Information > Store Name). Eg. "Your order %id% at %name%"</comment>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="heading_settings" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Settings</label>
<frontend_model>GingerPay\Payment\Block\Adminhtml\Render\Heading</frontend_model>
<comment><![CDATA[Configure the Creditcard payment settings.]]></comment>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="order_status_pending" translate="label comment" type="select" sortOrder="22" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Status Pending</label>
<source_model>GingerPay\Payment\Model\Adminhtml\Source\Pending</source_model>
<config_path>payment/ginger_methods_giropay/order_status_pending</config_path>
<comment><![CDATA[Set the order status before the customer is redirected to Payment Gateway]]></comment>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="order_status_processing" translate="label comment" type="select" sortOrder="24" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Status Processing</label>
<source_model>Magento\Sales\Model\Config\Source\Order\Status\Processing</source_model>
<config_path>payment/ginger_methods_giropay/order_status_processing</config_path>
<comment><![CDATA[Set the order status for Completed Payments]]></comment>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="invoice_notify" translate="label comment" type="select" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Send Invoice Email</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<config_path>payment/ginger_methods_giropay/invoice_notify</config_path>
<comment><![CDATA[Set the notification for to Notify the customer with the Invoice]]></comment>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="heading_limit" translate="label comment" type="text" sortOrder="90" showInDefault="1"
showInWebsite="1" showInStore="1">
<label>Limit &amp; Sorting</label>
<frontend_model>GingerPay\Payment\Block\Adminhtml\Render\Heading</frontend_model>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="96" showInDefault="1"
showInWebsite="1" showInStore="0">
<label>Payment from Applicable Countries</label>
<source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
<config_path>payment/ginger_methods_giropay/allowspecific</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="specificcountry" translate="label" type="multiselect" sortOrder="97" showInDefault="1"
showInWebsite="1" showInStore="0">
<label>Payment from Specific Countries</label>
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
<can_be_empty>1</can_be_empty>
<config_path>payment/ginger_methods_giropay/specificcountry</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1"
showInStore="0">
<label>Minimum Order Total</label>
<config_path>payment/ginger_methods_giropay/min_order_total</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1"
showInStore="0">
<label>Maximum Order Total</label>
<config_path>payment/ginger_methods_giropay/max_order_total</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
<field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1"
showInStore="0">
<label>Sort Order</label>
<frontend_class>validate-number</frontend_class>
<config_path>payment/ginger_methods_giropay/sort_order</config_path>
<depends>
<field id="active">1</field>
</depends>
</field>
</group>
</include>

0 comments on commit 85bffab

Please sign in to comment.