File: /var/www/ipsremont-demo/config/import1c.php
<?php
$http = getenv('1S_HTTP_HOST');
$https = getenv('1S_HTTPS_HOST');
$host = $https;
$config = [
'username' => 'web',
'password' => '12345',
'file_devices' => '/devices.xml',
'file_orders' => '/orders.xml',
'GetInPaymentOrder' => '/GetInPaymentOrder.xml',
'GetOutPaymentOrder' => '/GetOutPaymentOrder.xml',
'SalesReceipt' => '/SalesReceipt.xml',
'write_logs' => 1,
];
if (env('APP_ENV') == 'production') {
return array_merge($config, [
'url_parts' => $host . '/gettmc/',
'url_devices' => $host . '/getapparatus/',
'url_orders' => $host . '/receptiondocuments/v1/ReceiveApplications',
'url_parts_leftovers' => $host . '/stockbalance/',
// 'write_logs' => 0,
]);
} else {
return array_merge($config, [
'host' => $host,
'base_request' => $host . '/tmc/v1/112/',
'base_answer' => $host . '/ch_answer/v1/',
// 'base_request' => $https.'/tmc/v1/112/',
'url_parts' => $host . '/gettmc/',
'url_devices' => $host . '/getapparatus/',
// 'url_parts' => $https.'/gettmc/',
// 'url_devices' => $https.'/getapparatus/',
'url_orders' => $host . '/receptiondocuments/v1/ReceiveApplications',
'url_parts_leftovers' => $host . '/stockbalance/',
]);
}
// env('APP_URL') . '/parts1c';