-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
If API details are incorrect an exception is thrown (GoCardless_ApiException), and the user is unable to change the settings without manually going into the database.
Proposed solution:
try {
// Initialize library
GoCardless::set_account_details(array(
'app_id' => $gocardless_config['app_id'],
'app_secret' => $gocardless_config['app_secret'],
'merchant_id' => $gocardless_config['merchant_id'],
'access_token' => $gocardless_config['access_token'],
'ua_tag' => 'gocardless-wp/v' . GC_WP_VERSION
));
} catch (GoCardless_ApiException $e) {
echo 'API details are incorrect, please check and try again (see error below)';
echo $e->getMessage();
}
However this solution still doesn't catch the exception, maybe something in the GoCardless library handling exceptions? I'm not too sure as I'm not too familiar with exceptions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels