Skip to content

Commit

Permalink
Merge pull request #4 from appinlet/release/3.0.4
Browse files Browse the repository at this point in the history
Release/3.0.4
  • Loading branch information
appinlet authored Nov 5, 2020
2 parents fbae432 + 680ec90 commit 7050cb8
Show file tree
Hide file tree
Showing 25 changed files with 943 additions and 230 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# PayWeb_OpenCart
## PayGate OpenCart plugin v3.0.3 for OpenCart v3.0.3.2
## PayGate OpenCart plugin v3.0.4 for OpenCart v3.0.3.6

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://www.appinlet.com/wp-content/uploads/2018/09/OpenCart-Integration.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.3) 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.4) and unzip. You will them be able to follow the integration guide PDF which is included in the zip.

## Collaboration

Expand Down
8 changes: 7 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@ Date : Version: Description
Improve order processing workflow.
Handle email not set on checkout.
2019-10-22: v3.0.3 : Retain checkout cart on failed transaction.
Test with 3.0.3.2.
Test with 3.0.3.2.

2020-11-04: v3.0.4 : Combine iFrame and Redirect implementations.
Add 'Disable IPN' feature.
Add' Test Mode' feature.
Remove session in redirect callback for improved reliability.
Add 'Payment Types' feature.
98 changes: 89 additions & 9 deletions upload/admin/controller/extension/payment/paygate.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<?php

/*
* Copyright (c) 2019 PayGate (Pty) Ltd
* Copyright (c) 2020 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
* Released under the GNU General Public License
*/

class ControllerExtensionPaymentPaygate extends Controller
{

Expand All @@ -20,7 +22,13 @@ public function index()
if ( ( $this->request->server['REQUEST_METHOD'] == 'POST' ) && $this->validate() ) {
$this->model_setting_setting->editSetting( 'payment_paygate', $this->request->post );
$this->session->data['success'] = $this->language->get( 'text_success' );
$this->response->redirect( $this->url->link( 'marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true ) );
$this->response->redirect(
$this->url->link(
'marketplace/extension',
'user_token=' . $this->session->data['user_token'] . '&type=payment',
true
)
);
}

$data['heading_title'] = $this->language->get( 'heading_title' );
Expand All @@ -38,6 +46,8 @@ public function index()
$data['entry_geo_zone'] = $this->language->get( 'entry_geo_zone' );
$data['entry_status'] = $this->language->get( 'entry_status' );
$data['entry_sort_order'] = $this->language->get( 'entry_sort_order' );
$data['entry_notify_redirect'] = $this->language->get( 'entry_notify_redirect' );
$data['entry_iframe'] = $this->language->get( 'entry_iframe' );

$data['tab_general'] = $this->language->get( 'tab_general' );
$data['tab_order_status'] = $this->language->get( 'tab_order_status' );
Expand Down Expand Up @@ -65,16 +75,32 @@ public function index()

$data['breadcrumbs'][] = array(
'text' => $this->language->get( 'text_extension' ),
'href' => $this->url->link( 'marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true ),
'href' => $this->url->link(
'marketplace/extension',
'user_token=' . $this->session->data['user_token'] . '&type=payment',
true
),
);

$data['breadcrumbs'][] = array(
'text' => $this->language->get( 'heading_title' ),
'href' => $this->url->link( 'extension/payment/paygate', 'user_token=' . $this->session->data['user_token'], true ),
'href' => $this->url->link(
'extension/payment/paygate',
'user_token=' . $this->session->data['user_token'],
true
),
);

$data['action'] = $this->url->link( 'extension/payment/paygate', 'user_token=' . $this->session->data['user_token'], true );
$data['cancel'] = $this->url->link( 'marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true );
$data['action'] = $this->url->link(
'extension/payment/paygate',
'user_token=' . $this->session->data['user_token'],
true
);
$data['cancel'] = $this->url->link(
'marketplace/extension',
'user_token=' . $this->session->data['user_token'] . '&type=payment',
true
);

if ( isset( $this->request->post['payment_paygate_total'] ) ) {
$data['payment_paygate_total'] = $this->request->post['payment_paygate_total'];
Expand All @@ -91,19 +117,25 @@ public function index()
if ( isset( $this->request->post['payment_paygate_success_order_status_id'] ) ) {
$data['payment_paygate_success_order_status_id'] = $this->request->post['payment_paygate_success_order_status_id'];
} else {
$data['payment_paygate_success_order_status_id'] = $this->config->get( 'payment_paygate_success_order_status_id' );
$data['payment_paygate_success_order_status_id'] = $this->config->get(
'payment_paygate_success_order_status_id'
);
}

if ( isset( $this->request->post['payment_paygate_failed_order_status_id'] ) ) {
$data['payment_paygate_failed_order_status_id'] = $this->request->post['payment_paygate_failed_order_status_id'];
} else {
$data['payment_paygate_failed_order_status_id'] = $this->config->get( 'payment_paygate_failed_order_status_id' );
$data['payment_paygate_failed_order_status_id'] = $this->config->get(
'payment_paygate_failed_order_status_id'
);
}

if ( isset( $this->request->post['payment_paygate_cancelled_order_status_id'] ) ) {
$data['payment_paygate_cancelled_order_status_id'] = $this->request->post['payment_paygate_cancelled_order_status_id'];
} else {
$data['payment_paygate_cancelled_order_status_id'] = $this->config->get( 'payment_paygate_cancelled_order_status_id' );
$data['payment_paygate_cancelled_order_status_id'] = $this->config->get(
'payment_paygate_cancelled_order_status_id'
);
}

$this->load->model( 'localisation/order_status' );
Expand Down Expand Up @@ -144,6 +176,54 @@ public function index()
$data['payment_paygate_merchant_key'] = $this->config->get( 'payment_paygate_merchant_key' );
}

if ( isset( $this->request->post['payment_paygate_notifyredirect'] ) ) {
$data['payment_paygate_notifyredirect'] = $this->request->post['payment_paygate_notifyredirect'];
} else {
$data['payment_paygate_notifyredirect'] = $this->config->get( 'payment_paygate_notifyredirect' );
}

if ( isset( $this->request->post['payment_paygate_iframe'] ) ) {
$data['payment_paygate_iframe'] = $this->request->post['payment_paygate_iframe'];
} else {
$data['payment_paygate_iframe'] = $this->config->get( 'payment_paygate_iframe' );
}

if ( isset( $this->request->post['payment_paygate_creditcardmethod'] ) ) {
$data['payment_paygate_creditcardmethod'] = $this->request->post['payment_paygate_creditcardmethod'];
} else {
$data['payment_paygate_creditcardmethod'] = $this->config->get( 'payment_paygate_creditcardmethod' );
}

if ( isset( $this->request->post['payment_paygate_banktransfermethod'] ) ) {
$data['payment_paygate_banktransfermethod'] = $this->request->post['payment_paygate_banktransfermethod'];
} else {
$data['payment_paygate_banktransfermethod'] = $this->config->get( 'payment_paygate_banktransfermethod' );
}

if ( isset( $this->request->post['payment_paygate_zappermethod'] ) ) {
$data['payment_paygate_zappermethod'] = $this->request->post['payment_paygate_zappermethod'];
} else {
$data['payment_paygate_zappermethod'] = $this->config->get( 'payment_paygate_zappermethod' );
}

if ( isset( $this->request->post['payment_paygate_mobicredmethod'] ) ) {
$data['payment_paygate_mobicredmethod'] = $this->request->post['payment_paygate_mobicredmethod'];
} else {
$data['payment_paygate_mobicredmethod'] = $this->config->get( 'payment_paygate_mobicredmethod' );
}

if ( isset( $this->request->post['payment_paygate_momopaymethod'] ) ) {
$data['payment_paygate_momopaymethod'] = $this->request->post['payment_paygate_momopaymethod'];
} else {
$data['payment_paygate_momopaymethod'] = $this->config->get( 'payment_paygate_momopaymethod' );
}

if ( isset( $this->request->post['payment_paygate_masterpassmethod'] ) ) {
$data['payment_paygate_masterpassmethod'] = $this->request->post['payment_paygate_masterpassmethod'];
} else {
$data['payment_paygate_masterpassmethod'] = $this->config->get( 'payment_paygate_masterpassmethod' );
}

$data['header'] = $this->load->controller( 'common/header' );
$data['column_left'] = $this->load->controller( 'common/column_left' );
$data['footer'] = $this->load->controller( 'common/footer' );
Expand Down
48 changes: 33 additions & 15 deletions upload/admin/language/en-gb/extension/payment/paygate.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/*
* Copyright (c) 2019 PayGate (Pty) Ltd
* Copyright (c) 2020 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
*
* Released under the GNU General Public License
*/

Expand All @@ -15,26 +15,44 @@
$_['text_success'] = 'You have successfully configured the PayGate payment module.';
$_['text_edit'] = 'Edit PayGate';
$_['text_extension'] = 'Extensions';
$_['text_notify'] = 'Disabled';
$_['text_redirect'] = 'Enabled';
$_['text_iframe'] = 'iFrame';
$_['text_noframe'] = 'Redirect';
$_['text_testmode'] = 'Enabled';
$_['text_livemode'] = 'Disabled';
$_['text_methodyes'] = 'Enable Payment Type';
$_['text_methodno'] = 'Disable Payment Type';

// Entry
$_['entry_total'] = 'Total';
$_['entry_order_status'] = 'Initial Order Status';
$_['entry_geo_zone'] = 'Geo Zone';
$_['entry_status'] = 'Status';
$_['entry_sort_order'] = 'Sort Order';
$_['text_paygate'] = '<a onclick="window.open(\'https://www.paygate.co.za/\');"><img src="view/image/payment/paygate.gif" alt="PayGate" title="PayGate" style="border: 1px solid #EEEEEE;" /></a> PayWeb v3';
$_['entry_merchant_id'] = 'PayGate ID:';
$_['entry_merchant_key'] = 'PayGate Encryption Key:';
$_['entry_success_status'] = 'Successful Order status:';
$_['entry_failed_status'] = 'Failed Order Status:';
$_['entry_cancelled_status'] = 'Cancelled Order Status:';
$_['entry_total'] = 'Total';
$_['entry_order_status'] = 'Initial';
$_['entry_geo_zone'] = 'Geo Zone';
$_['entry_status'] = 'Status';
$_['entry_sort_order'] = 'Sort Order';
$_['text_paygate'] = '<a onclick="window.open(\'https://www.paygate.co.za/\');"><img src="view/image/payment/paygate.png" alt="PayGate" title="PayGate" style="border: 1px solid #EEEEEE;" /></a>';
$_['entry_merchant_id'] = 'PayGate ID';
$_['entry_merchant_key'] = 'Encryption Key';
$_['entry_success_status'] = 'Successful';
$_['entry_failed_status'] = 'Failed';
$_['entry_cancelled_status'] = 'Cancelled';
$_['entry_notify_redirect'] = 'Disable IPN';
$_['entry_iframe'] = 'Implementation';
$_['entry_testmode'] = 'Test Mode';
$_['entry_creditcardmethod'] = 'Enable Card on Checkout';
$_['entry_banktransfermethod'] = 'Enable SiD Secure EFT on Checkout';
$_['entry_zappermethod'] = 'Enable Zapper on Checkout';
$_['entry_mobicredmethod'] = 'Enable Mobicred on Checkout';
$_['entry_momopaymethod'] = 'Enable MoMoPay on Checkout';
$_['entry_masterpassmethod'] = 'Enable MasterPass on Checkout';

// Tab
$_['tab_general'] = 'General';
$_['tab_order_status'] = 'Order status';
$_['tab_order_status'] = 'Order Status';
$_['tab_pay_methods'] = 'Payment Types';

// Help
$_['help_total'] = 'The checkout total the order must reach before this payment method becomes active.';

// Error
$_['error_permission'] = 'Warning: You do not have permission to modify the PayGate payment method!';
$_['error_permission'] = 'Warning: You do not have permission to modify the PayGate payment method!';
Binary file removed upload/admin/view/image/payment/paygate.gif
Binary file not shown.
Binary file added upload/admin/view/image/payment/paygate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7050cb8

Please sign in to comment.