Post by RobbyS » Fri May 24, 2019 6:14 am

When trying to connect with square from the extension page, I am getting this error:
Notice: Undefined index: payment_squareup_sync_source in ~/admin/controller/extension/payment/squareup.php on line 1448Warning: Cannot modify header information - headers already sent by (output started at ~/admin/controller/startup/error.php:34) in ~/system/library/response.php on line 36

When I run the curl test script here viewtopic.php?f=198&t=186335&start=7, I got the correct output as listed on the same post.

What can I do to fix this error?

Newbie

Posts

Joined
Tue May 14, 2019 9:12 am

Post by thekrotek » Fri May 24, 2019 9:34 pm

Set Display Errors to No in your store's global settings.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by ULD99 » Wed May 29, 2019 11:34 pm

Hello,

I get the same type of error message when trying to add the Square Payments Extension to OpenCart. I would appreciate any help with editing the php code to fix this:

I have Opencart version 3.0.3.2 - my Webhost is Hostgator.com
When adding the extension for Square Payments Ver 3.1.8 - on hitting CONNECT, (to try and integrate OpenCart with Square Payments) I get the following error message:
Notice: Undefined index: access_token in:
OpenCart/admin/controller/extension/payment/squareup.php on line 537
Warning: Cannot modify header information - headers already sent by (output started at OpenCart/admin/controller/startup/error.php:34) in OpenCart/system/library/response.php on line 36
=====================================================

Here is the my code for lines referenced above:

Line 36 in OpenCart/system/library/response.php is:
public function redirect($url, $status = 302) {
header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url), true, $status);
exit();



Line 34 in OpenCart/admin/controller/startup/error.php is:
if ($this->config->get('config_error_display')) {
echo '<b>' . $error . '</b>: ' . $message . ' in <b>' . $file . '</b> on line <b>' . $line . '</b>';
}


Line 537 OpenCart/admin/controller/extension/payment/squareup.php is:
$previous_setting['payment_squareup_locations'] = $this->squareup_api->fetchLocations($token['access_token'], $first_location_id);

Please advise what Code changes I need to make to properly Connect Square Payments Account to my OpenCart.
I have verified that all Credentials, Oauth Secret, Webhooks and Signature Key have been correctly added to OpenCart. (SSL and CRON jobs are also in place)

Thank you for any help you can offer to fix this

Newbie

Posts

Joined
Fri Nov 23, 2018 3:50 am
Who is online

Users browsing this forum: No registered users and 136 guests