-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
2,475 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 PaynetEasy | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# PaynetEasy Payment Module for OsCommerce v4 | ||
|
||
This is a Payment Module for OsCommerce v4, that gives you the ability to process payments through payment service providers running on PaynetEasy. | ||
|
||
## Requirements | ||
|
||
* OsCommerce v4 | ||
* PHP Versions >= 7.0.0 ![GitHub](https://img.shields.io/badge/php-%3E%3D7.0.0-lightgrey) | ||
|
||
*Note:* this module has been tested only with OsCommerce v4+. | ||
|
||
## Installation (App Shop / Local Storage) | ||
|
||
* Upload ```plugin-oscommerce.zip``` to a ```App Shop / Local Storage``` | ||
|
||
* Click + sign in Action column to Install module from there. | ||
|
||
## Installation (Manual) | ||
|
||
* Unpack zip. | ||
|
||
* Navigate project folder ```lib\common\modules\orderPayment``` and upload unpack contents from ```plugin-oscommerce``` there. | ||
|
||
* Move file ```ot_payneteasy.php``` from ```lib\common\modules\orderPayment``` to ```lib\common\modules\orderTotal``` if installer doesn't move. | ||
|
||
* Move file ```StoredCards.php``` from ```lib\common\modules\orderPayment``` to ```lib\frontend\design\boxes\account``` if installer doesn't move. | ||
|
||
* Move file ```stored-cards.tpl``` from ```lib\common\modules\orderPayment``` to ```lib\frontend\themes\basic\boxes\account``` if installer doesn't move. | ||
|
||
## Deletion | ||
|
||
* Go to ```App Shop / Local Storage``` delete module from there | ||
|
||
* For Manual Navigate folder ```lib\common\modules\orderPayment``` delete payneteasy folder and file from there | ||
|
||
* Go to ```lib\common\modules\orderTotal``` delete ot_payneteasy.php from there. | ||
|
||
* Go to ```lib\frontend\design\boxes\account``` delete StoredCards.php from there. | ||
|
||
* Go to ```lib\frontend\themes\basic\boxes\account``` delete stored-cards.tpl from there. | ||
|
||
* Remove Stored Cards Block references from these tables TABLE_DESIGN_BOXES, TABLE_DESIGN_BOXES_SETTINGS, design_boxes_cache | ||
TABLE_TRANSLATION | ||
|
||
## Configuration | ||
|
||
* Login inside the __Admin Panel__ and go to ```Modules``` -> ```Payment``` -> ```Online``` | ||
* Check the Payment Module Panel ```PaynetEasy``` is visible in the list of installed Payment Method, | ||
apply filter Show not installed, if for In-Active module use Show inactive filter. | ||
* Click to ```PaynetEasy Payment Method``` and click the button ```Edit``` under the right side panel to expand the available settings | ||
* Set ```Enable PaynetPos``` to ```Yes```, set the correct credentials, select your prefered payment method and additional settings and click ```Update``` | ||
|
||
#### Enable SurchargeFee | ||
* Next go to ```Modules``` -> ```Order structure``` | ||
* Check the Module ```SurchargeFee``` is visible in the list of not installed, install it. | ||
* Click to ```SurchargeFee``` and click the button ```Edit``` under the right side panel to expand the available settings | ||
* Set ```Display Surcharge Fee``` to ```Yes```, Sort Order and click ```Update``` | ||
* Drag ```SurchargeFee``` above the Total Module so that surcharge fee if enable must be calculated under grand total. | ||
|
||
## Test data | ||
|
||
If you setup the module with default values, you can ask your payneteasy manager | ||
|
||
### Test card details | ||
|
||
Use the following test cards to make successful test payment: | ||
|
||
Test Card: | ||
|
||
* Visa - 4444555566661111- CVV 123 - non 3d secude approved 321 - 3d secure approved 777 - declined Expiry Date - 12/25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "PaynetEasy", | ||
"description": "This is a Payment Module for Oscommerce, that gives you the ability to process payments through payment service providers running on PaynetEasy.", | ||
"type": "payment", | ||
"version": "2.0.0", | ||
"authors": [ | ||
{ | ||
"name": "Payneasy.com", | ||
"email": "[email protected]", | ||
"homepage": "https://payneteasy.com/", | ||
"role": "Owner" | ||
} | ||
], | ||
"src": [ | ||
{ | ||
"action": "add", | ||
"type": "file", | ||
"path": "payneteasy.php" | ||
}, | ||
{ | ||
"action": "add", | ||
"type": "file", | ||
"path": "ot_payneteasy.php" | ||
}, | ||
{ | ||
"action": "copy", | ||
"type": "dir", | ||
"path": "payneteasy" | ||
} | ||
], | ||
"require": { | ||
"platform": "True" | ||
}, | ||
"class": "payneteasy" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of osCommerce ecommerce platform. | ||
* osCommerce the ecommerce | ||
* | ||
* @link https://www.oscommerce.com | ||
* @copyright Copyright (c) 2000-2022 osCommerce LTD | ||
* | ||
* Released under the GNU General Public License | ||
* For the full copyright and license information, please view the LICENSE.TXT file that was distributed with this source code. | ||
*/ | ||
namespace common\modules\orderTotal; | ||
|
||
use common\classes\modules\ModuleTotal; | ||
use common\classes\modules\ModuleStatus; | ||
use common\classes\modules\ModuleSortOrder; | ||
|
||
class ot_payneteasy extends ModuleTotal { | ||
|
||
var $title, $output; | ||
|
||
protected $visibility = [ | ||
'admin', | ||
'shop_order', | ||
]; | ||
|
||
function __construct() { | ||
parent::__construct(); | ||
|
||
$this->code = 'ot_payneteasy'; | ||
$this->title = ''; | ||
if (!defined('MODULE_ORDER_TOTAL_PAYNETEASY_STATUS')) { | ||
$this->enabled = false; | ||
return false; | ||
} | ||
$this->enabled = ((MODULE_ORDER_TOTAL_PAYNETEASY_STATUS == 'true') ? true : false); | ||
$this->sort_order = MODULE_ORDER_TOTAL_PAYNETEASY_SORT_ORDER; | ||
|
||
$this->output = array(); | ||
} | ||
|
||
function process($replacing_value = -1) { | ||
$module = $this->manager->getPayment(); | ||
|
||
$this->output = []; | ||
|
||
if( MODULE_PAYMENT_PAYNETEASY_STATUS == 'True' && $module == "payneteasy" ) { | ||
|
||
$order = $this->manager->getOrderInstance(); | ||
\common\helpers\Php8::nullArrProps($order->info, ['total_paid_exc_tax', 'total_paid_inc_tax', 'currency', 'currency_value']); | ||
$currencies = \Yii::$container->get('currencies'); | ||
$this->output = []; | ||
} | ||
} | ||
|
||
public function describe_status_key() { | ||
return new ModuleStatus('MODULE_ORDER_TOTAL_PAYNETEASY_STATUS', 'true', 'false'); | ||
} | ||
|
||
public function describe_sort_key() { | ||
return new ModuleSortOrder('MODULE_ORDER_TOTAL_PAYNETEASY_SORT_ORDER'); | ||
} | ||
|
||
public function configure_keys() { | ||
return array( | ||
'MODULE_ORDER_TOTAL_PAYNETEASY_STATUS' => | ||
array( | ||
'value' => 'true', | ||
'sort_order' => '1', | ||
'set_function' => 'tep_cfg_select_option(array(\'true\', \'false\'), ', | ||
), | ||
'MODULE_ORDER_TOTAL_PAYNETEASY_SORT_ORDER' => | ||
array( | ||
'title' => 'Sort Order', | ||
'value' => '90', | ||
'description' => 'Sort order of display.', | ||
'sort_order' => '2', | ||
), | ||
); | ||
} | ||
|
||
} |
Oops, something went wrong.