Closed VirtusB closed 6 years ago
Hi @VirtusB. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me $VERSION instance
where $VERSION
is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.
@VirtusB do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @engcom-backlog-nazar. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Verify that the issue is reproducible on 2.2-develop
branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop
branch, please add the label Reproduced on 2.2.x
[ ] 6. Add label Issue: Confirmed
once verification is complete.
[ ] 7. Make sure that automatic system confirms that report has been added to the backlog.
Hi @VirtusB, thank you for you report, This problem related to QuickPay not magento core, beacouse all payments in magento paylpal e.g are check if payment have additional information, for virtual product there are not, so if you use paypal or braintree everything will be ok.
Best regards.
@engcom-backlog-nazar So it's expected behaviour that getPayment() is null when the product is virtual, but not when the product is simple? getPayment() was not null in 2.2.4 even if the product was virtual, it wasn't a problem till 2.2.5
@VirtusB If product not virtual getPayment() not null, i'm checked with debugger for 2 payments paypal and braintree And have no issue on 2.2-devlop branch.
@engcom-backlog-nazar Exactly, if the product is not virtual then getPayment() is not null, but it shouldn't be null for virtual products either. getPayment() and getAdditionalInformation() should also work for virtual products, just like it did in 2.2.4 - how else are you supposed to retrieve the data? I'm sorry but I don't understand how this is intended. I'm not the only one with this issue, there are 2 links at the top that also mentions this.
@VirtusB Ok. but why i'm not able to reproduce your scenario ?
@engcom-backlog-nazar Maybe I misunderstood - when you tried, getPayment() was not null for virtual products? And getAdditionalInformation() worked? Did you use version 2.2.5 or 2.2.6? Thanks.
@VirtusB On 2.2-dev instance the same on 2.2.6 this works perfectly.
Other issues regarding this: https://github.com/magento/magento2/issues/13801 https://github.com/magento/magento2/issues/17302
Preconditions
Steps to reproduce
Expected result
Actual result
The code that fails:
$this->_objectManager->get('Magento\Checkout\Model\Session')->getLastRealOrder()
If the product is virtual then getLastRealOrder() returns an empty order, getPayment() is therefore null and the error is thrown.The full code of Redirect.php:
Just to clarify: this is not an issue with any third party payment module - getPayment() is not supposed to return null when the product is virtual.