Coder Social home page Coder Social logo

magento2-plugin's People

Contributors

bbutkovic avatar ivanviduka avatar ivanweiler avatar jasminsuljic avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

favicode

magento2-plugin's Issues

Callback failing

Preconditions:

Software versions:

  • monripayments/magento2: 1.2.0
  • magento/product-community-edition: 2.4.5-p1
  • PHP version: 8.1.11

Magento & Monri configured in sandbox mode.

Steps to reproduce:

  1. Add product to the cart
  2. Complete checkout

Expected result:

The order created as expected, transaction verified by callback from PGW

Actual results:

The order created, callback always fails with the following exception:

Not Found Exception caught: Order not found.

Full log entry:

  'location' => 'Monri\\Payments\\Controller\\Gateway\\Callback::execute',
  'errors' => 
  array (
    0 => 'Not Found Exception caught: Order not found.',
  ),
  'success' => false,
  'payload' => 
  array (
    'id' => 497011,
    'acquirer' => 'xml-sim',
    'order_number' => '000000005-63b2b77c1ef55',
    'order_info' => 'Magento Order',
    'amount' => 700,
    'currency' => 'EUR',
    'ch_full_name' => 'Stjepan Udovicic',
    'outgoing_amount' => 700,
    'outgoing_currency' => 'EUR',
    'approval_code' => '415187',
    'response_code' => '0000',
    'response_message' => 'transaction approved',
    'reference_number' => '96335',
    'systan' => '497011',
    'eci' => '06',
    'xid' => NULL,
    'acsv' => NULL,
    'cc_type' => 'visa',
    'status' => 'approved',
    'created_at' => '2023-01-02T11:53:39.274+01:00',
    'transaction_type' => 'authorize',
    'enrollment' => 'N',
    'authentication' => NULL,
    'pan_token' => NULL,
    'ch_email' => '[email protected]',
    'masked_pan' => '405840-xxx-xxx-0005',
    'issuer' => 'off-us',
    'number_of_installments' => NULL,
    'custom_params' => NULL,
    'expiration_date' => '2511',
    'issuer_groups' => 
    array (
    ),
  ),
) [] []

Additional notes:

It appears that the order is loaded from the database with order_number that is passed in the callback without modifications:
https://github.com/MonriPayments/magento2-plugin/blob/master/Controller/Gateway/Callback.php#L99

However, callback has a string appended as a suffix to the order number, resulting in the order failing to load. Most likely, I haven't fully checked.

Checkout issues with HR symbols

This piece of code here has a problem with HR symbols.

For example, if I input my first name as Stjepan and my last name as Udovičić xxxxxxxxxxć, then formatText() will return the invalid value. Ultimately, the order will be created, but the redirect will fail, as data can not be serialized for sending. following is observed in the log file:

[2023-02-03T14:17:13.163515+01:00] main.DEBUG: array (
  'location' => 'Monri\\Payments\\Controller\\Redirect\\Form\\Data::execute',
  'errors' => 
  array (
    0 => 'Unexpected exception caught: Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded',
  ),
  'success' => false,
  'payload' => 
  array (
  ),
) [] []

The result is that the customer is left on checkout with an empty error message, can't retry as the order is created, and has to re-add everything back to the cart.

image

Relevant data:
Module version: 1.2.0
Magento version: magento/project-community-edition: 2.4.4-p2
PHP version: 7.4.11

Log not created

Preconditions:

Software versions:

  • monripayments/magento2: 1.2.0
  • magento/product-community-edition: 2.4.5-p1
  • PHP version: 8.1.11

Magento & Monri configured in sandbox mode
Monri is configured only for "Monri components", nothing from "Monri Redirect" changed.
Enabled "Debug" under "Monri components"

Steps to reproduce:

  1. Add product to the cart
  2. Complete checkout

Expected result:

Magento log "monri_payments.log" was created with transaction details for debugging purposes

Actual results:

The log is not created

Additional notes:

The log is created once the "Debug" config is changed under "Monri Redirect", meaning that the config is being fetched from the wrong path.

New Order email sent right away before redirect

On Redirect version, new order email is sent during redirect process and it should be sent only if customer successfully finishes payment on Monri side.

Initialize command is not executed, which flags Magento not to send email. This also sometimes leaves pending orders in "new" state instead of planned "pending_payment".

Implement override url params

Implement new override url params to be more compatible with multi domain Magento setups.

  • success_url_override
  • cancel_url_override
  • callback_url_override

This will solve issues when store codes are used in url or when different stores are on different subdomains.
Also it will give ability to use same Monri account on different Magento websites (if ever needed).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.