Skip to content

Commit

Permalink
Merge pull request #3 from RBAtkins0n/master
Browse files Browse the repository at this point in the history
2019-10-22: v3.0.3
  • Loading branch information
appinlet authored Oct 22, 2019
2 parents 5680be0 + fe7baa4 commit fbae432
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 17 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.2 for OpenCart v3.0.2.1
## PayGate OpenCart plugin v3.0.3 for OpenCart v3.0.3.2

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.2) 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.3) and unzip. You will them be able to follow the integration guide PDF which is included in the zip.

## Collaboration

Expand Down
12 changes: 12 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
=====================================
Date : Version: Description
=====================================

2017-10-18: v3.0.0 : Initial release.
2018-06-29: v3.0.1 : Fix minor bug with GeoZone.
Fix auto install.
2018-11-27: v3.0.2 : Include order number in reference.
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.
2 changes: 1 addition & 1 deletion upload/admin/controller/extension/payment/paygate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2018 PayGate (Pty) Ltd
* Copyright (c) 2019 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/language/en-gb/extension/payment/paygate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2018 PayGate (Pty) Ltd
* Copyright (c) 2019 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down
2 changes: 1 addition & 1 deletion upload/admin/view/template/extension/payment/paygate.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
# Copyright (c) 2018 PayGate (Pty) Ltd
# Copyright (c) 2019 PayGate (Pty) Ltd
#
# Author: App Inlet (Pty) Ltd
#
Expand Down
20 changes: 12 additions & 8 deletions upload/catalog/controller/extension/payment/paygate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2018 PayGate (Pty) Ltd
* Copyright (c) 2019 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down Expand Up @@ -38,17 +38,19 @@ public function index()
$currency = filter_var( $this->currency->getCode(), FILTER_SANITIZE_STRING );
}

$returnUrl = filter_var( $this->url->link( 'extension/payment/paygate/paygate_return', '', true ), FILTER_SANITIZE_URL );
$transDate = filter_var( date( 'Y-m-d H:i:s' ), FILTER_SANITIZE_STRING );
$locale = filter_var( 'en', FILTER_SANITIZE_STRING );
$country = filter_var( $order_info['payment_iso_code_3'], FILTER_SANITIZE_STRING );
$email = filter_var( $order_info['email'], FILTER_SANITIZE_EMAIL );
$returnUrl = filter_var( $this->url->link( 'extension/payment/paygate/paygate_return', '', true ), FILTER_SANITIZE_URL );
$transDate = filter_var( date( 'Y-m-d H:i:s' ), FILTER_SANITIZE_STRING );
$locale = filter_var( 'en', FILTER_SANITIZE_STRING );
$country = filter_var( $order_info['payment_iso_code_3'], FILTER_SANITIZE_STRING );
$email = filter_var( $order_info['email'], FILTER_SANITIZE_EMAIL );
// Check if email empty due to some custom themes displaying this on the same page
$email = empty( $email ) ? $this->config->get( 'config_email' ) : $email;
$payMethod = '';
$payMethodDetail = '';
$notifyUrl = filter_var( $this->url->link( 'extension/payment/paygate/notify_handler', '', true ), FILTER_SANITIZE_URL );
$userField1 = $order_info['order_id'];
$userField2 = '';
$userField3 = 'opencart-v3.0.2';
$userField3 = 'opencart-v3.0.3.2';
$doVault = '';
$vaultID = '';
$encryption_key = $this->config->get( 'payment_paygate_merchant_key' );
Expand Down Expand Up @@ -166,7 +168,6 @@ public function paygate_return()
$status = '';

if ( isset( $this->session->data['order_id'] ) ) {
$this->cart->clear();

// Add to activity log
$this->load->model( 'account/activity' );
Expand Down Expand Up @@ -263,6 +264,9 @@ public function paygate_return()
}

$this->load->model( 'checkout/order' );
if ( $statusDesc == 'approved' ) {
$this->cart->clear();
}
$this->model_checkout_order->addOrderHistory( $this->session->data['order_id'], $orderStatusId, $resultsComment, true );
unset( $this->session->data['shipping_method'] );
unset( $this->session->data['shipping_methods'] );
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/language/en-gb/checkout/paygate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2018 PayGate (Pty) Ltd
* Copyright (c) 2019 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2018 PayGate (Pty) Ltd
* Copyright (c) 2019 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/model/extension/payment/paygate.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/*
* Copyright (c) 2018 PayGate (Pty) Ltd
* Copyright (c) 2019 PayGate (Pty) Ltd
*
* Author: App Inlet (Pty) Ltd
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
# Copyright (c) 2018 PayGate (Pty) Ltd
# Copyright (c) 2019 PayGate (Pty) Ltd
#
# Author: App Inlet (Pty) Ltd
#
Expand Down

0 comments on commit fbae432

Please sign in to comment.