Skip to content

"production" and "live" both used for same environment #1

@SirStepheno

Description

@SirStepheno

I noticed that the links on a order page lead to the preprod environment of Worldline, instead of the production environment.

A little search in the code gave me the reason, there are 2 different names used for the production environment in the config files and the code:

system/config.php, "live" is used and saved.

'environment' => array(
	'live' => array(
		'code' => 'live',
		'name' => 'text_live',
		'prefix' => '',
		'api_endpoint' => 'https://payment.direct.worldline-solutions.com'
	),
	'test' => array(
		'code' => 'test',
		'name' => 'text_test',
		'prefix' => '_test',
		'api_endpoint' => 'https://payment.preprod.direct.worldline-solutions.com'
	)
),

while in admin/controller/worldline.php, "production" is used 2 times:

if ($worldline_order_info['environment'] == 'production') {

	$data['transaction_url'] = 'https://merchant-portal.worldline-solutions.com/transactions/online/' . $data['transaction_id'];
} else {
	$data['transaction_url'] = 'https://merchant-portal.preprod.worldline-solutions.com/transactions/online/' . $data['transaction_id'];
}

Please review if there are more instances where this happens in the code, now some functionalities doesn't work and lead to wrong environment URL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions