-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New Order Status config in payment method is useless #5860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is a work around using around plugin for \Magento\Sales\Model\Order\Payment\State\CommandInterface:
|
Ho @hiephm We've created MAGETWO-57846 internal ticket regarding this issue, |
Hi @alena-marchenko |
Issues fixed: - MAGETWO-65422 Write default configs to shared configuration file by app:config:dump - MAGETWO-69567 [Mainline] - Closing the image view window causes mini-cart to drop down - MAGETWO-69607 Edition Specific BN-Codes for 2.2.x - MAGETWO-68936 Billing Agreement page is not loaded if Vault enabled - MAGETWO-57975 Impossible use ExtensionInterfaceFactory - MAGETWO-69580 Unstable automated test Magento\Paypal\Test\TestCase\InContextExpressOnePageCheckoutTest failed on variation InContextExpressOnePageCheckoutTestVariation1 - MAGETWO-69110 Incorrect status for order placed within Authorize.net with Fraud Filters Triggered (Filter Actions = Process as normal and report filter(s) triggered) - MAGETWO-68949 [Github] "We Can't Place The Order" error #9455 - MAGETWO-69112 No request sent to Authorize.net after reordering order in admin - MAGETWO-69584 Command config:sensitive:set does not work on the cloud - MAGETWO-57846 [Github] New Order Status config in payment method is useless #5860 - MAGETWO-67632 [Github] Invalid method usage in PayPal NVP callDoReauthorization method #9336 - MAGETWO-63239 [GITHUB] No possibility to save payment transaction details - MAGETWO-69121 Loader doesn't disappear if Authorize.net transact.dll fails request - MAGETWO-64518 \Magento\CatalogRule\Model\Indexer\IndexBuilder method "doReindexFull()" causes temporary missing sale prices - MAGETWO-60533 Data passed to Magento\Framework\ObjectManager\Config\Compiled is not validated - MAGETWO-70061 Exception on EE installation on environment with default-storage-engine=MyISAM - MAGETWO-69260 Unable to create shipping label due to error of lb to kg conversion - MAGETWO-58961 Multiselect text values are not searchable using QuickSearch with ElasticSearch - MQE-155 [FT] Magento\UrlRewrite\Test\TestCase\CreateProductWithSeveralWebsitesUrlRewriteTest randomly fails on Jenkins
Hi, @hiephm, the fix merged into the develop branch. |
…nt method is useless #5860 - for 2.1
…nt method is useless #5860 - for 2.1
Hi guys, I see this is in branch 2.3-developed, and it was backported to 2.1-develop. Is this going to be backported to 2.2 as well? Thanks! |
Hi, @hiephm I tried to execute your solution but any breakpoint stops on function when I purchase a new item and an order is created, I need to create a di.xml or something else?
And I have this structure in my module: --Compsaonline I have Magento2.1.8 CE |
@JMLucas96 creating a plugin requires to set up a <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Sales\Model\Order\Payment\State\CommandInterface">
<plugin name="your_name" type="Your\Module\path\CommandInterface"/>
</type>
</config> But this workaround doesn't work neither for me. And because I know flushing 100 times the cache + removing generated files is often not enough to see code updates, I directly put some Magento 2.0 for me (I know...). |
[TSG] Fixes for 2.3 (pr140) (2.3.6-develop)
Preconditions
Magento CE 2.1.0
Problem
In payment module that is gateway (support authorize, capture command), setting New Order Status config does not have any effect, new orders still have default status of processing state.
Reason
In
\Magento\Sales\Model\Order\Payment::place
, the status is get from config:which is assumed to be set to order later:
but in current code, this will never happen since in
processAction
there is a chain of calls which eventually call:This
stateCommand
can be either\Magento\Sales\Model\Order\Payment\State\AuthorizeCommand
or\Magento\Sales\Model\Order\Payment\State\CaptureCommand
, which in itsexecute
method having a code like this:This will always set status to
$order
(either fraud or default) and cause the above $orderStatus never been set.Suggestion fix:
I still not sure which place should be fixed, may be eliminate the call to
setOrderStateAndStatus
will do the job since the order state/status will be set later inPayment::place()
The text was updated successfully, but these errors were encountered: