update
This commit is contained in:
@@ -419,8 +419,8 @@ class OrderAdminService
|
||||
return false;
|
||||
}
|
||||
|
||||
$integrationsRepository = new \Domain\Integrations\IntegrationsRepository( $mdb );
|
||||
$accessToken = $integrationsRepository -> apiloGetAccessToken();
|
||||
$apiloRepository = new \Domain\Integrations\ApiloRepository( $mdb );
|
||||
$accessToken = $apiloRepository->apiloGetAccessToken();
|
||||
if (!$accessToken) {
|
||||
\Domain\Integrations\ApiloLogger::log(
|
||||
$mdb,
|
||||
@@ -675,7 +675,7 @@ class OrderAdminService
|
||||
global $config;
|
||||
|
||||
$db = $this->orders->getDb();
|
||||
$integrationsRepository = new \Domain\Integrations\IntegrationsRepository($db);
|
||||
$apiloRepository = new \Domain\Integrations\ApiloRepository($db);
|
||||
|
||||
if (empty($order['apilo_order_id'])) {
|
||||
return true;
|
||||
@@ -687,7 +687,7 @@ class OrderAdminService
|
||||
}
|
||||
|
||||
$payment_date = new \DateTime($order['date_order']);
|
||||
$access_token = $integrationsRepository->apiloGetAccessToken();
|
||||
$access_token = $apiloRepository->apiloGetAccessToken();
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "https://projectpro.apilo.com/rest/api/orders/" . $order['apilo_order_id'] . '/payment/');
|
||||
@@ -742,13 +742,13 @@ class OrderAdminService
|
||||
global $config;
|
||||
|
||||
$db = $this->orders->getDb();
|
||||
$integrationsRepository = new \Domain\Integrations\IntegrationsRepository($db);
|
||||
$apiloRepository = new \Domain\Integrations\ApiloRepository($db);
|
||||
|
||||
if (empty($order['apilo_order_id'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$access_token = $integrationsRepository->apiloGetAccessToken();
|
||||
$access_token = $apiloRepository->apiloGetAccessToken();
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, "https://projectpro.apilo.com/rest/api/orders/" . $order['apilo_order_id'] . '/status/');
|
||||
|
||||
@@ -790,8 +790,8 @@ class OrderRepository
|
||||
}
|
||||
}
|
||||
|
||||
if ($coupon && $coupon->is_one_time()) {
|
||||
$coupon->set_as_used();
|
||||
if ($coupon && (int)$coupon->one_time === 1) {
|
||||
(new \Domain\Coupon\CouponRepository($this->db))->markAsUsed((int)$coupon->id);
|
||||
}
|
||||
|
||||
$order = $this->orderDetailsFrontend($order_id);
|
||||
@@ -814,7 +814,7 @@ class OrderRepository
|
||||
\Shared\Helpers\Helpers::send_email($settings['contact_email'], 'Nowe zamówienie / ' . $settings['firm_name'] . ' / ' . $order['number'] . ' - ' . $order['client_surname'] . ' ' . $order['client_name'], $mail_order);
|
||||
|
||||
// zmiana statusu w realizacji jeżeli płatność przy odbiorze
|
||||
if ($payment_id == 3) {
|
||||
if (!empty($payment_method['is_cod'])) {
|
||||
$this->updateOrderStatus($order_id, 4);
|
||||
$this->insertStatusHistory($order_id, 4, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user