Closed cowell-manhnt7190 closed 2 years ago
Hi @cowell-manhnt7190 will check on this and get back to you. Thanks for reaching out to us
Hi @cowell-manhnt7190 after testing on our side, I can't replicate this, the feature is working fine using Magento 2.4.4 version. The plugins work fine after clicking the button place order & pay
. Do you mind to share your PHP version on this. I'm using PHP 8.1.9
Thank you
Hi @Xaxxis I try to debug on our side and I see that the issue happens if the order increment_id starts with a number other than 0 or the prefix is text, for example OT00000015.
Case 1: Order increment id 000000015 -> works fine if there exists order with entity_id is 15.
Case 2: Order increment id 400000015 -> works fine if there exists an order with entity_id of 400000015, but does not work if there is no order with entity_id of 400000015
Case 3: Order increment id OT00000015 -> does not work because order entity_id does not exist text
Step debug:
Midtrans/Snap/Controller/Payment/Redirect.php line 16 -> this is the root cause of issue
$paymentCode = $this->paymentOrderRepository->getPaymentCode($incrementId);
Midtrans/Snap/Model/Order/OrderRepository.php line 145
public function getPaymentCode($incrementId)
Midtrans/Snap/Model/Order/OrderRepository.php line 134
public function getOrderByIncrementId($realOrderId)
Hi @cowell-manhnt7190 After digging and re-replicate this, found the issue. will fix this soon and get back to you. Thanks
Hi @cowell-manhnt7190 the fix has already been released in a new version v2.7.1. Kindly try using the latest version. Thank you
Hi @Xaxxis thank you for your update, this issue fixed.
Preconditions and environment
Steps to reproduce
Expected result
Actual result
Other
Midtrans error log: The entity that was requested doesn't exist. Verify the entity and try again
Hint maybe:
getOrderByIncrementId in Midtrans/Snap/Model/Order/OrderRepository.php.
$this->magentoOrderRepository->get($realOrderId). Function get is default Magento with parameter is entity_id of order but in class Midtrans/Snap/Controller/Payment/Redirect.php (Line 16) call it with parameter is increment id.