1

After I have installed the following patches: SUPEE-6285-1.9.1v2, SUPEE-6482-1.9.1.1, SUPEE-6788-1.9.1.1, SUPEE-7405-1.9.1.1, my website's onepage checkout payment is not working.

Entered debit Card/Credit Card details in onepage checkout and then clicked "Place Order" but no error and the page stays as it is... received an email titled "payment transaction failure".

I got the following errors in system.log file.

2016-03-07T19:31:25+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:25+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:25+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:25+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:29+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:29+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:29+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:29+00:00 DEBUG (7): GBP - GBP
2016-03-07T19:31:32+00:00 ERR (3): Notice: Undefined variable: status  in app/code/local/Paymentsense/Pay/Model/Pay.php on line 720
2016-03-07T19:31:32+00:00 ERR (3): Notice: Undefined index: error  in app/code/local/Paymentsense/Pay/Model/Pay.php on line 720
2016-03-07T19:31:32+00:00 ERR (3): Notice: Undefined variable: CrossReference  in app/code/local/Paymentsense/Pay/Model/Pay.php on line 720
2016-03-07T19:31:32+00:00 ERR (3): Notice: Undefined variable: message  in app/code/local/Paymentsense/Pay/Model/Pay.php on line 720

I got the following error in pay.log

2016-03-08T12:32:55+00:00 DEBUG (7): Array
(
    [status] => 
    [transaction_id] => 1457440375
    [fraud] => 1
    [message] => 
    [data] => Array
    (
    )

and finally the exception.log

2016-03-08T12:32:55+00:00 ERR (3): 
exception 'Mage_Core_Exception' in app/Mage.php:595
Stack trace:
#0 app/code/local/Paymentsense/Pay/Model/Pay.php(103): Mage::throwException(NULL)
#1 app/code/core/Mage/Sales/Model/Order/Payment.php(443): Paymentsense_Pay_Model_Pay->capture(Object(Mage_Sales_Model_Order_Payment), '119.99')
#2 app/code/core/Mage/Sales/Model/Order/Invoice.php(385): Mage_Sales_Model_Order_Payment->capture(Object(Mage_Sales_Model_Order_Invoice))
#3 app/code/core/Mage/Sales/Model/Order/Payment.php(608): Mage_Sales_Model_Order_Invoice->capture()
#4 app/code/core/Mage/Sales/Model/Order/Payment.php(410): Mage_Sales_Model_Order_Payment->_invoice()
#5 app/code/core/Mage/Sales/Model/Order/Payment.php(348): Mage_Sales_Model_Order_Payment->capture(NULL)
#6 app/code/core/Mage/Sales/Model/Order.php(896): Mage_Sales_Model_Order_Payment->place()
#7 app/code/core/Mage/Sales/Model/Order.php(1114): Mage_Sales_Model_Order->_placePayment()
#8 [internal function]: Mage_Sales_Model_Order->place()
#9 app/code/core/Mage/Core/Model/Resource/Transaction.php(105): call_user_func(Array)
#10 app/code/core/Mage/Core/Model/Resource/Transaction.php(159): Mage_Core_Model_Resource_Transaction->_runCallbacks()
#11 app/code/core/Mage/Sales/Model/Service/Quote.php(189): Mage_Core_Model_Resource_Transaction->save()
#12 app/code/core/Mage/Sales/Model/Service/Quote.php(249): Mage_Sales_Model_Service_Quote->submitOrder()
#13 app/code/core/Mage/Checkout/Model/Type/Onepage.php(784): Mage_Sales_Model_Service_Quote->submitAll()
#14 app/code/core/Mage/Checkout/controllers/OnepageController.php(579): Mage_Checkout_Model_Type_Onepage->saveOrder()
#15 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_OnepageController->saveOrderAction()
#16 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#17 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#20 /index.php(87): Mage::run('', 'store')
#21 {main}

This is the line 720 in app/code/local/Paymentsense/Pay/Model/Pay.php

return array('status'=>$status,'transaction_id' => time() , 'fraud' => rand(0,1),'message'=>$json['error'],'data'=>$json,'CrossReference'=>$CrossReference,'paymenstatus'=>$message);

Here is the complete Pay.php file

It's really frustrating... I have been trying to fix this issue for past 3 days... any help would be appreciated...

Thanks in advance...

user6036056
  • 33
  • 1
  • 8
  • Have you consulted the authors of the Paymentsense_Pay module? – scrowler Mar 08 '16 at 19:38
  • Yeah... it was working perfectly before updating patches. – user6036056 Mar 08 '16 at 19:47
  • My first bet would be that curl returns some error. In `apiCall()` method after curl request there's `if( $err == 0 )` condition. If it is true it reads data from the return but if not there is no logic handling error. Those "Notice: Undefined variable" lines in main log supports that thesis as the variables used in line 720 are set inside that if condition. Since they are not set it means that code is never inside it. You could try add the following code just before line 720: `if ($err !=0) {Mage::log($err);}` and check logs what error code it is. – Zefiryn Mar 08 '16 at 19:47
  • "DEBUG (7): 7" added it after "DEBUG (7): GBP - GBP" in the system.log – user6036056 Mar 08 '16 at 20:00
  • No updates in exception.log and pay.log – user6036056 Mar 08 '16 at 20:02
  • Curl error 7 means that host is not reachable. Either your server is blocking outbound traffic or connection is failing due to ssl certificate problems. For the first issue you need to ask server admin where you have store located for the second you need a developer to test your server. The module might use certification pem file which could have changed. I tested connection from my local computer without using cert file and with empty xml message and received curl response of empty message in request so the server is reachable and something is blocking your server connection with the gateway. – Zefiryn Mar 08 '16 at 20:22
  • I see... Do you have any developer to fix this issue... I will pay once the issue fixed... – user6036056 Mar 08 '16 at 20:37
  • Any file permission or folder permission have any role in this issue? – user6036056 Mar 08 '16 at 20:38
  • Any further debugging will require someone to log into the server and test from there. My knowledge and skills unfortunately ends at this point and without direct access to the serve I am unable to help any further. I am in UTC+1 so it's 10pm at the moment and I am going to bed in a while. I would assume that since you are running magento you should have a contact to an IT company that provides services to help you with the issue. – Zefiryn Mar 08 '16 at 21:05
  • Can you provide us with a link to the shop? – Gerard de Visser Mar 09 '16 at 09:19
  • https://homedone.co.uk/ this is the website link – user6036056 Mar 09 '16 at 11:33

0 Answers0