0

I am trying to implement our new MPGS payment gateway but have run into a problem on the live server that did not appear on the test server. All ran smoothly on the localhost.

When posting a call to api/rest/createsession/ I receive a 500 Internal Server Error.

The response is:

{"messages":{"error":[{"code":0,"message":"Invalid method Mastercard_Mpgs_Model_MpgsApi_Rest::_critical
(Array\n(\n    [0] => Resource internal error.\n)\n)"}]}}

Exception log stack trace:

2017-02-03T02:58:06+00:00 ERR (3): 
exception 'Varien_Exception' with message 'Invalid method Mastercard_Mpgs_Model_MpgsApi_Rest::_critical(Array
(
[0] => Resource internal error.
)
)' in /home/safetyli/public_html/lib/Varien/Object.php:653
Stack trace:
#0     /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/MpgsApi/Rest.php(84): Varien_Object->__call('_critical', Array)
#1 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/MpgsApi/Rest.php(84): Mastercard_Mpgs_Model_MpgsApi_Rest->_critical('Resource intern...')
#2 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/MpgsApi/Rest.php(113): Mastercard_Mpgs_Model_MpgsApi_Rest->sender(1, 'session', Array)
#3 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/Api2/Restapi/Rest/Guest/V1.php(63): Mastercard_Mpgs_Model_MpgsApi_Rest->create_checkout_session('100001721-5893f...', Object(Mage_Sales_Model_Quote))
#4 /home/safetyli/public_html/app/code/community/Mastercard/Mpgs/Model/Api2/Restapi/Rest/Guest/V1.php(106): Mastercard_Mpgs_Model_Api2_Restapi_Rest_Guest_V1->_create(Array)
#5 /home/safetyli/public_html/app/code/core/Mage/Api2/Model/Dispatcher.php(74): Mastercard_Mpgs_Model_Api2_Restapi_Rest_Guest_V1->dispatch()
#6 /home/safetyli/public_html/app/code/core/Mage/Api2/Model/Server.php(239): Mage_Api2_Model_Dispatcher->dispatch(Object(Mage_Api2_Model_Request), Object(Mage_Api2_Model_Response))
#7 /home/safetyli/public_html/app/code/core/Mage/Api2/Model/Server.php(107): Mage_Api2_Model_Server->_dispatch(Object(Mage_Api2_Model_Request), Object(Mage_Api2_Model_Response), Object(Mage_Api2_Model_Auth_User_Guest))
#8 /home/safetyli/public_html/api.php(73): Mage_Api2_Model_Server->run()
#9 {main}

Ive looked at Mastercard/Mpgs/Model/MpgsApi/Rest.php but not sure what to change.

Does anyone have any idea of where to start troubleshooting? I've tried a few things without much success. I am not a coder so go easy on me.

Cheers

1
  • Anyone have any ideas?
    – user49532
    Commented Feb 23, 2017 at 0:41

1 Answer 1

0
  1. proxy CURLOPT_PROXY and
  2. CURLOPT_PROXYPORT

Try to add above 2 variables values in you CURL request.

That solved my problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.