paygate / payweb_magento_2 Goto Github PK
View Code? Open in Web Editor NEWThis is the PayGate PayWeb3 plugin for Magento 2.
License: GNU General Public License v3.0
This is the PayGate PayWeb3 plugin for Magento 2.
License: GNU General Public License v3.0
We have installed the latest version of the PayGate module version 2.4.1. We're on Magento 2.4.2 and require this payment method going forward.
Do you plan on making this module stable for this Mgento version (2.4.2)?
[2021-05-19 20:05:10] report.CRITICAL: Exception message: We could not find "Order" for processing Trace: <pre>#1 PayGate\PayWeb\Controller\Redirect\Index->execute() called at [vendor/magento/framework/Interception/Interceptor.php:58] #2 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #3 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php:51] #4 Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() called at [vendor/magento/framework/Interception/Interceptor.php:135] #5 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #6 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->___callPlugins() called at [generated/code/PayGate/PayWeb/Controller/Redirect/Index/Interceptor.php:23] #7 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:111] #8 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #9 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #10 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #11 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->___callPlugins() called at [generated/code/PayGate/PayWeb/Controller/Redirect/Index/Interceptor.php:113] #12 PayGate\PayWeb\Controller\Redirect\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:186] #13 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:118] #14 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #15 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #16 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:99] #17 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #18 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:71] #19 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #20 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #21 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23] #22 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116] #23 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23] #24 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263] #25 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:41]
The original topic mentioned here (which was closed) : Change paymentTypes in PayWeb/Model/PayGate.php to use static descriptions
At the time when I requested a change to use static descriptions I was still under the impression that paymentTypes
have some use, but it turns out it is not used in v2.4.8
at all.
So, since I have now been waiting for the next release mentioned which would include the above changes, this is still not available, and since I am forced to use v2.4.8
at the moment, I investigated $paymentTypes
further and to make a solution for our use.
I do not see $paymentTypes
being used anywhere.
Inside PayWeb/Model/PayGate.php
function prepareFields()
does this:
if ($paymentType !== '0' && $this->getConfigData('paygate_pay_method_active') != '0') {
$fields['PAY_METHOD'] = $this->getPaymentType($paymentType);
$fields['PAY_METHOD_DETAIL'] = $this->getPaymentTypeDetail($paymentType);
}
getPaymentType():
public function getPaymentType($pt)
{
switch ($pt) {
case self::BANK_TRANSFER:
return self::BANK_TRANSFER;
break;
case self::ZAPPER_METHOD:
return 'EW';
break;
case self::SNAPSCAN_METHOD:
return 'EW';
break;
case self::MOBICRED_METHOD:
return 'EW';
break;
case self::MOMOPAY_METHOD:
return 'EW';
break;
case self::MASTERPASS_METHOD:
return 'EW';
break;
case self::PAYPAL_METHOD:
return 'EW';
break;
default:
return 'CC';
break;
}
}
getPaymentDetail():
public function getPaymentTypeDetail($ptd)
{
switch ($ptd) {
case self::BANK_TRANSFER:
return self::BANK_TRANSFER_METHOD_DETAIL;
break;
case self::ZAPPER_METHOD:
return self::ZAPPER_DESCRIPTION;
break;
case self::SNAPSCAN_METHOD:
return self::SNAPSCAN_DESCRIPTION;
break;
case self::MOBICRED_METHOD:
return self::MOBICRED_DESCRIPTION;
break;
case self::MOMOPAY_METHOD:
return self::MOMOPAY_METHOD_DETAIL;
break;
case self::MASTERPASS_METHOD:
return self::MASTERPASS_DESCRIPTION;
break;
case self::PAYPAL_METHOD:
return self::PAYPAL_DESCRIPTION;
break;
default:
return self::CREDIT_CARD_DESCRIPTION;
break;
}
}
At first when I opened this ticket I assumed it is that $paymentTypes inside /PayGate.php used, however I now realise this is not the case:
/view/frontend/web/template/payment/paygate.html
<!-- ko foreach: { data: JSON.parse(getPaymentTypesList()), as: 'option' }
This is referenced inside view/frontend/web/js/view/payment/method-renderer/paygate-method.js
:
getPaymentTypesList: function () {
var paymentTypes = window.checkoutConfig.payment.paygate.paymentTypeList
return paymentTypes
},
paymentTypeList
is defined in /PayWeb/Model/PaygateConfigProvider.php
:
'paymentTypeList' => $this->getPaymentTypes()
Relevant part inside PaygateConfigProvider->getPaymentTypes()
:
$allTypes = array(
'CC' => array(
'value' => 'CC',
'label' => "Card",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/mastercard-visa.svg'),
),
'BT' => array(
'value' => 'BT',
'label' => "SiD Secure EFT",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/sid.svg'),
),
'EW-ZAPPER' => array(
'value' => 'EW-ZAPPER',
'label' => "Zapper",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/zapper.svg'),
),
'EW-SNAPSCAN' => array(
'value' => 'EW-SNAPSCAN',
'label' => "SnapScan",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/snapscan.svg'),
),
'EW-MOBICRED' => array(
'value' => 'EW-MOBICRED',
'label' => "Mobicred",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/mobicred.svg'),
),
'EW-MOMOPAY' => array(
'value' => 'EW-MOMOPAY',
'label' => "MoMoPay",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/momopay.svg'),
),
'EW-MASTERPASS' => array(
'value' => 'EW-MASTERPASS',
'label' => "MasterPass",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/masterpass.svg'),
),
'EW-PAYPAL' => array(
'value' => 'EW-PAYPAL',
'label' => "PayPal",
'image' => $this->getViewFileUrl('PayGate_PayWeb::images/paypal.svg'),
)
In short:
Paygate->paymentTypes
is not used anywhere in v2.4.8....
but getPaymentTypeDetail()
converts paymentType
into its relevant label. This process seems to be on order creation which is not useful when trying to update frontend labels
PaygateConfigProvider->getPaymentTypes()
is using hard-coded Labels which would have been more useful if they actually referenced those constants in /Paygate.php ($paymentTypes)
.
Since I am using v2.4.8
there is no easy way to submit a Pull Request, as I will have to override both PayGate.php
and PaygateConfigProvider.php
Sorry for highlighting something, but I need clarification:
I want to update your recent changes (#36), but I have now read in this thread that v2.5.1
requires Magento 2.4.5
.
Am I correct in saying that there is not going to be any compatible version for Magento 2.3 anymore, I would not be able to upgrade to v2.5.1 or any 'future versions' as Paygate support continues to suggest I do... and don't understand the compatibility requirements
Magento 2.4 is still in branch 2.4-dev
; and looking at the 1000s of open issues far from 'production ready'.
What about sites that are still running Magento 2.3, on PHP7.3/PHP7.4
? I don't think we are the only ones?
As most of the Magento2 world is now handled via composer, it would be great if you could include a composer.json
file to make this module available via composer.
Please create a new release, because currently there is still a dependency on ext-curl & ext-http and this has been fixed in this commit c8ada34
We have tried integrating the Pay web Magento plugin. We are successfully redirected to paygate page on checkout, but while redirecting back to our website we are redirected to the home page with an error "Invalid Form Key. Please refresh the page and try again."
go to portal
Add the product to the cart.
Select a country, province, and enter the south African Pincode. eg. South Africa, Gauteng, 2198.
Select Anyone Shipping Method.
Click on "Go To Checkout".
Enter Address and phone number.
Click on Next at button.
Select Paygate and click on "Place order"
Enter Test Credit Card Number as below
4000000000000002, Select any future expiry date and 123 as CVV
Click Next
Click ok in alert and submit.
On submission, the Magento takes back to the home page with the error " Invalid Form Key. Please refresh the page and try again. "
Hello,
We are getting error on paygate success redirect page "Please provide payment for the order".
pagegate success response redirect to checkout cart page not order success page.
We are using magento 2.3.4.
Let me know if you want any information from our side.
PayGate keeps creating multiple orders while a customer is busy paying via Credit Card or SID. When the customer cancels, the order gets cancelled and the session starts again which is undestandable. However we have a lot of cases where their order is Pending Payment and then then two or three orders later we get a Processing order.
E.g: https://cl.ly/5e80af3076dd/Image%202019-08-16%20at%2016.19.09.png
Something is causing the session to drop and instead of updating the Pending Payment order to Processing it keeps creating a new order.
I have a request from my company to change the text displayed for some of the payment options, and the current implementation of PayWeb/Model/PayGate.php
uses constants for the descriptions:
protected $paymentTypes = [
self::CREDIT_CARD_METHOD => self::CREDIT_CARD_DESCRIPTION,
self::BANK_TRANSFER_METHOD => self::BANK_TRANSFER_METHOD_DETAIL,
self::ZAPPER_METHOD => self::ZAPPER_DESCRIPTION,
self::SNAPSCAN_METHOD => self::SNAPSCAN_DESCRIPTION,
self::MOBICRED_METHOD => self::MOBICRED_DESCRIPTION,
self::MOMOPAY_METHOD => self::MOMOPAY_METHOD_DETAIL,
self::SCANTOPAY_METHOD => self::SCANTOPAY_DESCRIPTION,
self::PAYPAL_METHOD => self::PAYPAL_DESCRIPTION,
];
I would like to override the descriptions for these payment types inside Model/PayGate.php
without changing anything else, so that any updates you do on this file in the future remains.
I would like to request static
to be used for these payment type descriptions instead of self
:
protected $paymentTypes = [
self::CREDIT_CARD_METHOD => static::CREDIT_CARD_DESCRIPTION,
self::BANK_TRANSFER_METHOD => static::BANK_TRANSFER_METHOD_DETAIL,
self::ZAPPER_METHOD => static::ZAPPER_DESCRIPTION,
self::SNAPSCAN_METHOD => static::SNAPSCAN_DESCRIPTION,
self::MOBICRED_METHOD => static::MOBICRED_DESCRIPTION,
self::MOMOPAY_METHOD => static::MOMOPAY_METHOD_DETAIL,
self::SCANTOPAY_METHOD => static::SCANTOPAY_DESCRIPTION,
self::PAYPAL_METHOD => static::PAYPAL_DESCRIPTION,
];
This means that I just change the values for the constants inside the overriding class, without having to completely change protected $paymentTypes
const CREDIT_CARD_DESCRIPTION = 'Credit Card';
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.