Moyasar Payment Gateway plugin for Magento 2
To install the plugin follow the Documentation.
Bug reports and pull requests are welcome.
The package is available as open source under the terms of the MIT License.
Moyasar Payment Gateway plugin for Magento 2
To install the plugin follow the Documentation.
Bug reports and pull requests are welcome.
The package is available as open source under the terms of the MIT License.
When ajax fails, the error of type "invalid_request_error" (entity_requirements, card validation), and "authentication_error" should appear to the client if there is any xhr.responseJSON.errors
Create an invoice automatically of the order after a successful payment
https://docs.magento.com/m2/ce/user_guide/sales/invoices.html
If the payment initiated
and the order status is pending
for more than 15 min, fetch the payment to update the order status.
This is helpful in case the buyer didn't return to the store by callback_url
.
3-D payment error messages format caused an error that makes the failed order to be placed
Exception #0 (Exception): Notice: A non well formed numeric value encountered in /var/www/html/app/code/Moyasar/Mysr/Helper/Data.php on line 38 #1 Moyasar\Mysr\Helper\Data->cancelCurrentOrder(&Magento\Sales\Model\Order\Interceptor#00000000143899360000000043fbd456#, '3-D Secure trans...') called at [app/code/Moyasar/Mysr/Controller/Redirect/Response.php:27]
We need to add an option like the one found in WooCommerce to enable supported networks:
Then we need to use these enabled networks in the payment form using the supported_networks
option
Make the request after this: rest/default/V1/guest-carts/:id/payment-information
which creates the order and then use the Order ID instead of CartId may fix the issue.
Need to check this is compatible with PCI.
We need to record validation/system errors returned by Moyasar's API when a payment attempt failed and no payment has been created within our system.
Such failures can include: validation errors, account not active, etc...
The Order/Cancel endpoint must receive an array of strings specifying the failure occurred.
@sundusabdullah I will handle this issue, but I need you to reflect these changes once I implement them in the new version.
Verify the amount before redirecting the user to 3D Secure.
It sent before 3ds redirection.
This is reported by customer uses Unifonic API.
Many customers complain about the recurrence of the error message (Allowed time frame for transaction has been expired), after review, it is clear that there were payment attempts and failed with the same error, but not clear what the reason or if they got redirected to Bank Page.
Client request:
Orders placed using Apple pay do not include
moyasar_id
in additional_information.
We need to refactor the Apple Pay validation controller to conform to the ways Magento 2 works and also reduce reliance on MoyasarHelper
First, we need our class to implement HttpPostActionInterface
instead of extending Action
and CsrfAwareActionInterface
. You can checkout Cancel
controller as a reference.
We can also use ReadsJson
trait to improve readability of form data handling.
On line 33
let us remove isPost
check as the HttpPostActionInterface
interface will ensure only post requests are allowed here.
For returning JSON, let us use the standard Magento way representJson
, please checkout Cancel
controller for example.
One last thing, let us move the validation code out of MoyasarHelper
into the controller. We will reduce clutter in the helper and since only this controllers validates the session no need for it to be in a shared helper
The CurrencyHelper
contains a lot of unnecessary data, we need to remove them and simplify its code. Please refactor data for each currency from the following:
'KWD' => [
'fraction_digits' => 3,
'rounding_increment' => 0
],
To the following:
'KWD' => 3,
You need to update fractionDigits
and fractionsMap
to work with the new structure
These safari versions still get "apple pay is not supported on your browser
" error msg:
Magento\\Framework\\View\\Asset\\File\\NotFoundException(code: 0): Unable to get content for 'frontend/Mgs/baytonia/ar_SA/Moyasar_Mysr/js/applepay-wrapper.min.js' at /home/baytonia/public_html/vendor/magento/framework/View/Asset/File.php:187)"} []
Issue a direct AJAX request to Moyasar API to create the payment (https://api.moyasar.com/v1/payments)
payment id
with the order before sending the user to continue, in case no error.Redirect the user to transaction_url
.
https://moyasar.com/docs/payments/best-practices/using-ajax/
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.