Jump to content

Cannot Access Modules > Payments Page. How to Assign Country to allow Specific Payment


Recommended Posts

Hi guys,

 

Hope someone can help. I am running version 1.5.3.1, and have issues clicking and reaching the Payments 

page from Modules Tab. It is the AdminPaymentController.php (which exists on the server) ... when I click

that page, it shows the following in Chrome:

 

---------------------------------------------------------------------------

 

The www.domain.com page isn’t working
 
www.domain.com is currently unable to handle this request.
HTTP ERROR 500
---------------------------------------------------------------------------
 
It is this URL:
 
index.php?controller=AdminPayment&token=XXXXXX
 
Any ideas why this page is broken, and how to make it work?
 
If not, then this is my REAL problem: 
 
I have two payment options enabled in my cart - Credit Card (we manually collect card info and send it to our payment processor), and PayPal.
 
I need to allow ONLY Credit Card option for some countries.
 
So, if I cannot access the AdminPayment controller page, how can I do this in the MySQL Database itself directly?
 
What table handles this? 
 
Can someone guide me how to allow only Credit Card option for Thailand within phpMyAdmin directly?
 
Thank you,
 
Elyssa
 

 

 

 

Link to comment
Share on other sites

Did you edit config/defines.inc.php and change the value of _PS_MODE_DEV_ from false to true so you get an error message instead of a 500 error? That should give a hint into the cause of the error.

 

Regarding manually restricting payment modules by country, you can edit the ps_module_country table in your database using phpMyAdmin and make sure there is only one row for the credit card module's ID with the country ID of Thailand. You can find the credit card module's ID in the ps_module table and the ID of Thailand in the ps_country_lang table.

Link to comment
Share on other sites

Thanks for the reply @rocky! I just checked the config file, and it looks as though I had "true" already set. 

See current settings:

 

/* Debug only */
define('_PS_MODE_DEV_', true);
if (_PS_MODE_DEV_)
{
@ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', true);
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', true);
}
else
{
@ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', false);
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
}

 

 

 

What should I change it to?

 

 

As it stands currently, when I go to the Payments page, it shows the error I mentioned (basically blank page

with 500 not found)... could it be because I have it set to "true"? 

 

I don't notice any other debug errors anywhere... not sure why it's set to "true"... :-/

 

And thank you for explaining how to do this in phpmyadmin - i will test that out and see if it works!

 

Much appreciated!

 

Elyssa

Link to comment
Share on other sites

That's right. Here's what it should be:



/* Debug only */
if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', true);
}
/* Compatibility warning */
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
if (_PS_MODE_DEV_ === true) {
@ini_set('display_errors', 'on');
@error_reporting(E_ALL | E_STRICT);
define('_PS_DEBUG_SQL_', true);
} else {
@ini_set('display_errors', 'off');
define('_PS_DEBUG_SQL_', false);
}

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...