Post by straightlight » Mon Oct 23, 2017 4:41 am

In catalog/controller/extension/payment/sagepay_server.php file,

find:

Code: Select all

public function success() {
add above:

Code: Select all

public function failure() {
		$this->load->language('extension/payment/g2apay');

		$this->session->data['error'] = $this->language->get('text_generic_error');

		$this->response->redirect($this->url->link('checkout/checkout', '', true));
	}
Then, in catalog/language/en-gb/extension/payment/g2apay.php file,

find:

Code: Select all

$_['text_title']
add right below:

Code: Select all

$_['text_generic_error']		= 'There was an error processing your request.';
This should resolved the problem.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by straightlight » Mon Oct 23, 2017 5:25 am

In addition on the same controller file, find:

Code: Select all

if ($response_data === false) {
			$this->response->redirect($this->url->link('extension/payment/failure', '', true));
		}

		if (strtolower($response_data->status) != 'ok') {
			$this->response->redirect($this->url->link('extension/payment/failure', '', true));
		}
		
replace with:

Code: Select all

if ($response_data === false) {
			$this->response->redirect($this->url->link('checkout/failure', '', true));
		}

		if (strtolower($response_data->status) != 'ok') {
			$this->response->redirect($this->url->link('checkout/failure', '', true));
		}
		

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by straightlight » Mon Oct 23, 2017 5:56 am

For further diagnostics when receiving the response data from G2APay API;

In catalog/model/extension/payment/g2apay.php file,

find:

Code: Select all

curl_close($curl);
add right below:

Code: Select all

if ($this->config->get('payment_g2apay_debug') == 1) {
			$log = new Log('g2apay.log');
			
			$log->write('Response data: ' . print_r(json_decode($response, true)));
		}
Once tested a transaction, see the log entries that begins with: Response data: . The provided response will be from the actual transaction being replied by G2APay. However, if these issues needs to be troubleshooted on the forum, do NOT include the confidential information along.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by straightlight » Mon Oct 23, 2017 7:06 am

In admin/controller/extension/payment/g2apay.php file,

find:

Code: Select all

$this->session->data['complete'] = $this->language->get('text_complete');
replace with:

Code: Select all

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

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by straightlight » Mon Oct 23, 2017 7:35 am

The status and token fields are missing from the API response. The Opencart G2APay controller first refers to the status field which, obviously, will enforce the payment to fail at this time. This issue has now been addressed on Github.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by straightlight » Sat Mar 21, 2020 12:07 am

Other solutions have been found which seem to be continuing on OC v3.0.3.2 release: https://github.com/opencart/opencart/co ... d5c35a7e55

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Post by straightlight » Sat Mar 21, 2020 12:15 am

Commit issue 6125 on Opencart Github also informs by Daniel that the issue has already been fixed on the Master Branch.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.


Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member
Online

Posts

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

Users browsing this forum: No registered users and 7 guests