From bad0e5c83019ca68718f316ac467edf9b17746d6 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Thu, 7 Nov 2024 12:57:52 +0100 Subject: [PATCH] =?UTF-8?q?Zmie=C5=84=20limit=20d=C5=82ugo=C5=9Bci=20wiado?= =?UTF-8?q?mo=C5=9Bci=20zam=C3=B3wienia=20z=201024=20na=20900=20znak=C3=B3?= =?UTF-8?q?w=20oraz=20popraw=20formatowanie=20b=C5=82=C4=99d=C3=B3w=20wali?= =?UTF-8?q?dacji=20w=20odpowiedzi=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cron.php b/cron.php index d92b396..63b7534 100644 --- a/cron.php +++ b/cron.php @@ -466,7 +466,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se } //TODO: ostatnio był problem kiedy wiadomość miała mniej 1024 znaki ale zawierała przeniesienie tekstu '
' i do tego jeszcze miała emoji. Wtedy APILO tego nie przepuszczał. - if ( strlen( $order_message ) > 1024 ) + if ( strlen( $order_message ) > 900 ) $order_message = '

Wiadomość do zamówienia była zbyt długa. Sprawdź szczegóły w panelu sklepu

'; // add transport as product @@ -554,7 +554,7 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se 'type' => \front\factory\ShopPaymentMethod::get_apilo_payment_method_id( $order['payment_method_id'] ) ]; } - + $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "https://projectpro.apilo.com/rest/api/orders/" ); curl_setopt( $ch, CURLOPT_POST, 1 ); @@ -589,8 +589,10 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se } elseif ( $response['message'] == 'Validation error' ) { - \S::pre( $response ); - \S::pre( $postData ); + echo '
';
+      echo print_r( $response, true );
+      echo print_r( $postData, true );
+      echo '
'; } else {