Post by coldwellr » Fri Mar 16, 2018 7:13 pm

I'm using OpenCart 3.0.2.0. I already have PayPal Standard setup are working fine.

I'm trying to setup PayPal Express because I now need to use recurring profiles. In the extensions setup, when I click on 'configure live' I enter my PayPal credentials in the popup box and it tells me that Opencart has been authorised. However, when I click on 'return to OpenCart' the API details have not been added, and the extension is not setup. Am I missing something? Do I have to manually add the API details or should it set these up for me?

I've tried enabling popups, I've fixed the "environment: '{{ environment }}'" bug (not sure that's the issue) but I can't get the extension to set itself up? Any suggestions?

Many thanks.

New member

Posts

Joined
Fri Nov 17, 2017 9:07 pm

Post by straightlight » Fri Mar 16, 2018 8:21 pm

1 - Ensure to clear all OC caches from the OC admin after adding the {{ environment }} fix.
2 - In your admin/controller/extension/payment/pp_express.php file,

What are the instances of:

Code: Select all

$this->request->post['
do you notice? Could you provide some of them?

In addition, what is the entire line you notice containing:

Code: Select all

$this->model_setting_setting->editSetting(
?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldwellr » Mon Mar 19, 2018 6:34 pm

Hi. I have cleared the cache (using the button in admin, not manually removing cache files).

I have 127 instances of

Code: Select all

$this->request->post['
- here are some of them...

Code: Select all

if (isset($this->request->post['payment_pp_express_username'])) {
			$data['payment_pp_express_username'] = $this->request->post['payment_pp_express_username'];
		} else {
			$data['payment_pp_express_username'] = $this->config->get('payment_pp_express_username');
		}

		if (isset($this->request->post['payment_pp_express_password'])) {
			$data['payment_pp_express_password'] = $this->request->post['payment_pp_express_password'];
		} else {
			$data['payment_pp_express_password'] = $this->config->get('payment_pp_express_password');
		}

		if (isset($this->request->post['payment_pp_express_signature'])) {
			$data['payment_pp_express_signature'] = $this->request->post['payment_pp_express_signature'];
		} else {
			$data['payment_pp_express_signature'] = $this->config->get('payment_pp_express_signature');
		}
There are 2 instances of

Code: Select all

$this->model_setting_setting->editSetting(
as follows:

Line 15:

Code: Select all

if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
			$this->model_setting_setting->editSetting('payment_pp_express', $this->request->post);

			$this->session->data['success'] = $this->language->get('text_success');

			$this->response->redirect($this->url->link('marketplace/extension', 'user_token=' . $this->session->data['user_token'] . '&type=payment', true));
		}
and line 338:

Code: Select all

$this->model_setting_setting->editSetting('payment_pp_express', $pp_express_settings);
Any idea what might be wrong?

New member

Posts

Joined
Fri Nov 17, 2017 9:07 pm

Post by straightlight » Mon Mar 19, 2018 7:23 pm

The prefixes looks fine. If the form is still not saving afterwards, we may be looking at a cache issue. Look in your PHPMyAdmin's OC settings table and see if the key field containing: payment_pp ending with _status changes value when saving the form from the OC admin.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldwellr » Tue Mar 20, 2018 12:04 am

Hi. When I click to configure PayPal Express (and connect to PayPal, get authroised, then return to OpenCart admin) the status setting in the database seems to be still '0':

Code: Select all

|       4451 |        0 | payment_pp_express            | payment_pp_express_status                       | 0   
Do you think I need to manually clear some cache files, or maybe change this setting myself? Thanks!

New member

Posts

Joined
Fri Nov 17, 2017 9:07 pm

Post by straightlight » Tue Mar 20, 2018 12:08 am

Since the prefixes looks fine and the status value is not changing, we may be looking at a cache issue. Ensure to follow these instructions: viewtopic.php?f=176&t=200804#p717782

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldwellr » Tue Mar 20, 2018 6:13 pm

Hi. When I installed OpenCart (3.0.2.0) I manually created the storage folder outside the webroot and pointed my config files to that. I have created a new storage folder and copied the files into that (from the 'upload/system/storage' folder that I originally downloaded). I've recursively set write permissions on my new storage folder. I can't find a .htaccees file in the OpenCart root folder so I'm not sure about removing any reference to the system/storage folder?

I still seem to have the same issue - every time I go through the PayPal Express 'Configure Live' process it refuses to setup the extension.

Image

New member

Posts

Joined
Fri Nov 17, 2017 9:07 pm

Post by straightlight » Tue Mar 20, 2018 9:00 pm

If you did followed all instructions and edit your config.php and admin/config.php file so for the DIR_STORAGE folder to locate your new storage folder outside the public_html folder and the problem still persists, then your domain is experiencing cache issues. Contact your host to resolve this issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldwellr » Wed Mar 21, 2018 6:45 pm

Hi. I've had to give up trying to use the auto 'configure live' - instead I've manually added the API credentials in the extension setup. The extension will now allow itself to be enabled and appears in the checkout. However, I'm getting 'Security header is not valid' as a response. I'm assuming this is a problem with the API credentials. I have PayPal Standard installed and working - and I got the API credentials from the PayPal profile.

Do you happen to know - if I request new API credentials, will that stop my PayPal Standard working? Does 'Standard' use different API credentials to 'Express'?

Many thanks for your help with this.

New member

Posts

Joined
Fri Nov 17, 2017 9:07 pm

Post by straightlight » Wed Mar 21, 2018 6:56 pm

Does 'Standard' use different API credentials to 'Express'?
Yes, different generated API credentials are required between both services.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by coldwellr » Fri Mar 23, 2018 5:40 pm

Ok cheers for your help. I've had to move on to a different project but I will be coming back to this.

Many thanks.

New member

Posts

Joined
Fri Nov 17, 2017 9:07 pm

Post by straightlight » Fri Mar 23, 2018 6:31 pm

Hi. I've had to give up trying to use the auto 'configure live' - instead I've manually added the API credentials in the extension setup
No problem. Although, also take note of this quote regarding the matched variables. It is possible that your configuration variables are mismatched and needs to be adjusted. For instance, take a look at your admin/controller/extension/payment/pp_express.php file.

What are the $this->config->get and $this->request->post variable keys beginning with?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 125 guests