Skip to content

Commit

Permalink
Merge pull request #8 from appinlet/release/3.0.8
Browse files Browse the repository at this point in the history
Release/3.0.8
  • Loading branch information
appinlet committed Feb 3, 2022
2 parents 98e815c + 0c0b551 commit ee35e3c
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 98 deletions.
4 changes: 2 additions & 2 deletions README.md
@@ -1,12 +1,12 @@
# PayWeb_OpenCart
## PayGate OpenCart plugin v3.0.7 for OpenCart v3.0.3.7
## PayGate OpenCart plugin v3.0.8 for OpenCart v3.0.3.7

This is the PayGate PayWeb3 plugin for OpenCart. Please feel free to contact the PayGate support team at support@paygate.co.za should you require any assistance.

## Installation
[![How To Setup PayGate PayWeb for OpenCart](https://appinlet.com/wp-content/uploads/2021/01/How-To-Setup-PayGate-PayWeb-for-OpenCart.jpg)](https://www.youtube.com/watch?v=vP457DVuhGc "How To Setup PayGate PayWeb for OpenCart")

Please navigate to the [releases page](https://github.com/PayGate/PayWeb_OpenCart/releases), download the latest release (v3.0.7) and unzip. You will them be able to follow the integration guide PDF which is included in the zip.
Please navigate to the [releases page](https://github.com/PayGate/PayWeb_OpenCart/releases), download the latest release (v3.0.8) and unzip. You will them be able to follow the integration guide PDF which is included in the zip.

## Collaboration

Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
@@ -1,6 +1,10 @@
=====================================
Date : Version: Description
=====================================
2022-02-03: v3.0.8 : Add Scan to Pay payment type rebrand.
Improve JSON returned in some themes.
Improve IPN and Session handling.

2021-09-29: v3.0.7 : Add PayPal to payment types.

2021-07-20: v3.0.6 : Bug fixes and code quality improvements.
Expand Down
18 changes: 9 additions & 9 deletions upload/admin/controller/extension/payment/paygate.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2021 PayGate (Pty) Ltd
* Copyright (c) 2022 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand All @@ -11,14 +11,14 @@ class ControllerExtensionPaymentPaygate extends Controller
{

private $error = array();

const PAYMENT_URL = "marketplace/extension";
const PAYGATE_LANGUAGE = "extension/payment/paygate";

public function getToken(){
return $this->session->data['user_token'];
}

public function formatPaymentUrl($path){
$token = $this->getToken();
return $this->url->link(
Expand All @@ -27,7 +27,7 @@ public function formatPaymentUrl($path){
true
);
}

public function formatUrl($path){
$token = $this->getToken();
return $this->url->link(
Expand Down Expand Up @@ -75,7 +75,7 @@ public function index()
$data['button_cancel'] = $this->language->get( 'button_cancel' );
$data['error_warning'] = isset($this->error['warning'])?$data['error_warning']:'';
$data['breadcrumbs'] = array();

$data['breadcrumbs'][] = array(
'text' => $this->language->get( 'text_home' ),
'href' => $this->formatUrl('common/dashboard'),
Expand All @@ -89,7 +89,7 @@ public function index()
$data['breadcrumbs'][] = array(
'text' => $this->language->get( 'heading_title' ),
'href' => $this->formatUrl(self::PAYGATE_LANGUAGE),
);
);

$data['action'] = $this->formatUrl(self::PAYGATE_LANGUAGE);
$data['cancel'] = $this->formatPaymentUrl(self::PAYMENT_URL);
Expand All @@ -113,14 +113,14 @@ public function index()
$data['payment_paygate_mobicredmethod'] = $this->checkPostValue("payment_paygate_mobicredmethod");
$data['payment_paygate_momopaymethod'] = $this->checkPostValue("payment_paygate_momopaymethod");
$data['payment_paygate_geo_zone_id'] = $this->checkPostValue("payment_paygate_geo_zone_id");
$data['payment_paygate_masterpassmethod'] = $this->checkPostValue("payment_paygate_masterpassmethod");
$data['payment_paygate_scantopaymethod'] = $this->checkPostValue("payment_paygate_scantopaymethod");
$data['header'] = $this->load->controller( 'common/header' );
$data['column_left'] = $this->load->controller( 'common/column_left' );
$data['footer'] = $this->load->controller( 'common/footer' );

$this->response->setOutput( $this->load->view( self::PAYGATE_LANGUAGE, $data ) );
}

public function checkPostValue($var){
return isset($this->request->post["$var"])?$this->request->post["$var"]:$this->config->get( "$var" );
}
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/language/en-gb/extension/payment/paygate.php
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2021 PayGate (Pty) Ltd
* Copyright (c) 2022 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down Expand Up @@ -43,7 +43,7 @@
$_['entry_paypalmethod'] = 'Enable PayPal on Checkout';
$_['entry_mobicredmethod'] = 'Enable Mobicred on Checkout';
$_['entry_momopaymethod'] = 'Enable MoMoPay on Checkout';
$_['entry_masterpassmethod'] = 'Enable MasterPass on Checkout';
$_['entry_scantopaymethod'] = 'Enable ScanToPay on Checkout';

// Tab
$_['tab_general'] = 'General';
Expand Down
8 changes: 4 additions & 4 deletions upload/admin/view/template/extension/payment/paygate.twig
@@ -1,5 +1,5 @@
{#
# Copyright (c) 2021 PayGate (Pty) Ltd
# Copyright (c) 2022 PayGate (Pty) Ltd
#
# Author: App Inlet (Pty) Ltd
#
Expand Down Expand Up @@ -306,10 +306,10 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label" for="input-masterpassmethod">{{ entry_masterpassmethod }}</label>
<label class="col-sm-4 control-label" for="input-scantopaymethod">{{ entry_scantopaymethod }}</label>
<div class="col-sm-8">
<select name="payment_paygate_masterpassmethod" id="input-masterpassmethod" class="form-control">
{% if payment_paygate_masterpassmethod == 'yes' %}
<select name="payment_paygate_scantopaymethod" id="input-scantopaymethod" class="form-control">
{% if payment_paygate_scantopaymethod == 'yes' %}
<option value="yes" selected="selected">{{ text_methodyes }}</option>
<option value="no">{{ text_methodno }}</option>
{% else %}
Expand Down

0 comments on commit ee35e3c

Please sign in to comment.