nrvn1 Posted March 21, 2013 Share Posted March 21, 2013 When i try to cancel an order and refund the customer via back office (trying to create a credit note at the same time) it gives me the following error: Fatal Error: id_transaction is null please help me & tell me exactly how to solve this thanks Link to comment Share on other sites More sharing options...
a_smith Posted April 5, 2013 Share Posted April 5, 2013 +1 to the problem Link to comment Share on other sites More sharing options...
jmpalazon Posted April 12, 2013 Share Posted April 12, 2013 +1 to the problem Link to comment Share on other sites More sharing options...
Thymotep Posted April 15, 2013 Share Posted April 15, 2013 I have resolved this problem in my PS 1.4.8.2 with Paypal 3.4.8. In the paypal.php file, i have changed for Hook " hookCancelProduct " this line : $refund = $this->_makeRefund($paypal_order->id_transaction, (int)$order->id, $amount); By this one : $refund = $this->_makeRefund($paypal_order['id_transaction'], (int)$order->id, $amount); And it's work for me ! 2 Link to comment Share on other sites More sharing options...
Ukoo - Guillaume Posted April 30, 2013 Share Posted April 30, 2013 The solution of Thymotep work for me to! (PS1.4.9 - PAYPAL 3.4.8) Thank you Link to comment Share on other sites More sharing options...
benjamin utterback Posted April 30, 2013 Share Posted April 30, 2013 Hi Ukoo, also the 3.5 version of PayPal is released. That version should solve the problem as well. You can find it for free here, http://addons.prestashop.com/en/payments-gateways-prestashop-modules/1748-paypal.html Link to comment Share on other sites More sharing options...
mytheory. Posted June 4, 2013 Share Posted June 4, 2013 Hi, Just want to note that PayPal versions 3.5.0 and 3.5.1 do not fix this problem. Well actually 3.5.1 partially solves this issue in that a "partial refund" will not result in an error. However, this option does not automatically refund the cost of the items to the customer. It merely refunds the product in the backoffice and generates a credit slip. Then it is up to us to log into our paypal account and manually issue the refund. For both versions, using the "standard refund" button results in the same error as above. I will try the fix from above (few posts up) and report back when we get a chance to test. BTW we are on PS v.1.5.4.1. Also, orders with "payment error" are still being created in the BO... somedays we have to cancel a lot of orders because they were created with a payment error status. FYI. Thanks! Link to comment Share on other sites More sharing options...
emily_d Posted June 13, 2013 Share Posted June 13, 2013 (edited) Hi Ukoo, also the 3.5 version of PayPal is released. That version should solve the problem as well. You can find it for free here, http://addons.presta...748-paypal.html Hi Benjamin, this doesn't fix the problem. Thymotep fix is the right solution, PayPalOrder::getOrderById returns an array and it should not be used as an object with ->id_transaction but with ['id_transaction']. Edited June 13, 2013 by emily_d (see edit history) Link to comment Share on other sites More sharing options...
benjamin utterback Posted June 13, 2013 Share Posted June 13, 2013 Hi Benjamin, this doesn't fix the problem. Thymotep fix is the right solution, PayPalOrder::getOrderById returns an array and it should not be used as an object with ->id_transaction but with ['id_transaction']. Hi Emily, Which PayPal version are you using? We can do some more investigating and see if we can have a permanent solution. Link to comment Share on other sites More sharing options...
emily_d Posted June 13, 2013 Share Posted June 13, 2013 (edited) Hi Emily, Which PayPal version are you using? We can do some more investigating and see if we can have a permanent solution. The latest one from GitHub (https://github.com/P...ypal/paypal.php). You can see that on two places $paypal_order->id_transaction is accessed like a property with -> notation, but PayPalOrder::getOrderById returns an array so you must access it via its key $paypal_order['id_transaction']. // l. 596, function hookCancelProduct $refund = $this->_makeRefund($paypal_order->id_transaction, (int)$order->id, $amount); // l. 1090, function _updatePaymentStatusOfOrder $response = $paypal_lib->makeCall($this->getAPIURL(), $this->getAPIScript(), 'GetTransactionDetails', '&'.http_build_query(array('TRANSACTIONID' => $paypal_order->id_transaction), '', '&')); Also $paypal_order['id_transaction'] is used correctly in other parts of the PayPal class, on lines 1008,1010,1047. I've encountered the problem with the error mentioned in the thread in the hookCancelProduct method but it should be interesting to look at the second problem in method _updatePaymentStatusOfOrder. As far as I can see, _updatePaymentStatusOfOrder is never called. So it should not provoke problems. Edited June 14, 2013 by emily_d (see edit history) Link to comment Share on other sites More sharing options...
mytheory. Posted July 2, 2013 Share Posted July 2, 2013 Hi, I can also confirm that Thymotep's solution from above works. It worked with PayPal version 3.5.1 and up. Oddly, even the newest version of PayPal does not implement this solution. FYI. Link to comment Share on other sites More sharing options...
bbgun91 Posted August 19, 2013 Share Posted August 19, 2013 Hi, I confirm that Thymotep's solution works for me too. I use Prestashop v1.4.10 and the module Paypal v3.5.7. As Emily also noticed, we also need to modify the line 1090 (or 1091 for me). Hi Benjamin, did you try this function ? With all my respect for you and your work, It seems that you should test before answering. There is no investigation to do, it's just an abvious code mistake which goes from versions to other versions of this module without being fixed. Cheers. Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 17, 2013 Share Posted September 17, 2013 Hi, I confirm that Thymotep's solution works for me too. I use Prestashop v1.4.10 and the module Paypal v3.5.7. As Emily also noticed, we also need to modify the line 1090 (or 1091 for me). Hi Benjamin, did you try this function ? With all my respect for you and your work, It seems that you should test before answering. There is no investigation to do, it's just an abvious code mistake which goes from versions to other versions of this module without being fixed. Cheers. Hi bbgun91, thanks for your feedback. Our developing team does the test and confirms the fix to me. However, there are times that the fixes still have updates. We all work hard to make sure that we provide a quality PayPal module and I apologize for not communicating more thoroughly with you to describe the fixes. This issue should definitely be solved with version 3.6 and if not, please let me know. I will do my best to find a quick resolution. Link to comment Share on other sites More sharing options...
Rodolphe Posted September 27, 2013 Share Posted September 27, 2013 I have resolved this problem in my PS 1.4.8.2 with Paypal 3.4.8. In the paypal.php file, i have changed for Hook " hookCancelProduct " this line : $refund = $this->_makeRefund($paypal_order->id_transaction, (int)$order->id, $amount); By this one : $refund = $this->_makeRefund($paypal_order['id_transaction'], (int)$order->id, $amount); And it's work for me ! Thank you, works fine for me (Prestas 1.4.11 / PayPal 3.6). Rodolphe 1 Link to comment Share on other sites More sharing options...
Pete78 Posted January 2, 2014 Share Posted January 2, 2014 I commited a bugfix to the sourcecode. Hopefully the request will be considered in the next version (3.6.1. hasn't the fix.) 1 Link to comment Share on other sites More sharing options...
benjamin utterback Posted January 2, 2014 Share Posted January 2, 2014 I commited a bugfix to the sourcecode. Hopefully the request will be considered in the next version (3.6.1. hasn't the fix.) Can you send us the link the Github commit that you submitted? Thank you so much for helping the software, you're awesome. Link to comment Share on other sites More sharing options...
Pete78 Posted January 2, 2014 Share Posted January 2, 2014 https://github.com/Shoprunners/PrestaShop-modules/commit/ace966534a66eb914ed3acf733d206644b8b0ea9 Link to comment Share on other sites More sharing options...
avionicom Posted January 10, 2014 Share Posted January 10, 2014 I also confirm that with PS 1.5.5 and Paypal 3.6 doesn't work. I've also another problem: after receiving the error "transaction id is null", it does not allow me to refund anyway! Anyone solved this problem? Link to comment Share on other sites More sharing options...
avionicom Posted January 12, 2014 Share Posted January 12, 2014 After this error, the product has been marked as refunded, so now I can not issue a credit slip. How to solve? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now