diff --git a/resources/pot/retailcrm-es_ES.pot b/resources/pot/retailcrm-es_ES.pot index 0ba0ccb..4b9533b 100644 --- a/resources/pot/retailcrm-es_ES.pot +++ b/resources/pot/retailcrm-es_ES.pot @@ -235,8 +235,8 @@ msgstr "Activar la transferencia de números en retailCRM" msgid "Transferring the order number" msgstr "Transferencia de un número de pedido" -msgid "Transferring the payment amount" -msgstr "Transferencia de un monto de pago" +msgid "Do not transmit the cost of delivery" +msgstr "No transferir el costo de envío" msgid "Corporate customers support" msgstr "Soporte a clientes corporativos" diff --git a/resources/pot/retailcrm-ru_RU.pot b/resources/pot/retailcrm-ru_RU.pot index a632a47..c7a380d 100644 --- a/resources/pot/retailcrm-ru_RU.pot +++ b/resources/pot/retailcrm-ru_RU.pot @@ -244,9 +244,6 @@ msgstr "Активировать передачу номера в retailCRM" msgid "Transferring the order number" msgstr "Передача номера заказа" -msgid "Transferring the payment amount" -msgstr "Передача суммы оплаты" - msgid "Do not transmit the cost of delivery" msgstr "Не передавать себестоимости доставки" diff --git a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php index 95b3173..af8c6d3 100644 --- a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php +++ b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php @@ -129,15 +129,6 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration 'id' => 'api_options' ); - $this->form_fields['send_payment_amount'] = array( - 'title' => __( 'Transferring the payment amount', 'retailcrm' ), - 'label' => ' ', - 'description' => '', - 'class' => 'checkbox', - 'type' => 'checkbox', - 'desc_tip' => true - ); - $this->form_fields['send_delivery_net_cost'] = array( 'title' => __( 'Do not transmit the cost of delivery', 'retailcrm' ), 'label' => ' ', diff --git a/src/include/order/class-wc-retailcrm-order-payment.php b/src/include/order/class-wc-retailcrm-order-payment.php index 7c9da2e..24657e3 100644 --- a/src/include/order/class-wc-retailcrm-order-payment.php +++ b/src/include/order/class-wc-retailcrm-order-payment.php @@ -53,10 +53,6 @@ class WC_Retailcrm_Order_Payment extends WC_Retailcrm_Abstracts_Data $this->reset_data(); $data = array(); - if (!empty($this->settings['send_payment_amount']) && $this->settings['send_payment_amount'] === WC_Retailcrm_Base::YES) { - $data['amount'] = (double) $order->get_total(); - } - if (!$this->is_new) { $data['externalId'] = $externalId; } else { @@ -105,12 +101,6 @@ class WC_Retailcrm_Order_Payment extends WC_Retailcrm_Abstracts_Data return array(); } - if (!empty($this->settings['send_payment_amount']) - && $this->settings['send_payment_amount'] === WC_Retailcrm_Base::NO - ) { - unset($data['amount']); - } - return $data; } @@ -118,7 +108,6 @@ class WC_Retailcrm_Order_Payment extends WC_Retailcrm_Abstracts_Data { $this->data = array( 'externalId' => '', - 'amount' => 0.00, 'type' => '', 'status' => '', 'paidAt' => '', diff --git a/src/languages/retailcrm-es_ES.mo b/src/languages/retailcrm-es_ES.mo index 31cf39d..3484bb0 100644 Binary files a/src/languages/retailcrm-es_ES.mo and b/src/languages/retailcrm-es_ES.mo differ diff --git a/src/languages/retailcrm-ru_RU.mo b/src/languages/retailcrm-ru_RU.mo index 553a944..089b3fb 100644 Binary files a/src/languages/retailcrm-ru_RU.mo and b/src/languages/retailcrm-ru_RU.mo differ diff --git a/tests/order/test-wc-retailcrm-order-payment.php b/tests/order/test-wc-retailcrm-order-payment.php index 6f029f8..5c3f848 100644 --- a/tests/order/test-wc-retailcrm-order-payment.php +++ b/tests/order/test-wc-retailcrm-order-payment.php @@ -30,7 +30,6 @@ class WC_Retailcrm_Order_Payment_Test extends WC_Retailcrm_Test_Case_Helper public function test_build($externalId) { $settings = $this->getOptions(); - $settings['send_payment_amount'] = 'no'; $order_payment = new WC_Retailcrm_Order_Payment($settings); $data = $order_payment->build($this->order, $externalId)->get_data(); @@ -42,7 +41,6 @@ class WC_Retailcrm_Order_Payment_Test extends WC_Retailcrm_Test_Case_Helper } $this->assertArrayHasKey('type', $data); - $this->assertArrayNotHasKey('amount', $data); $this->assertArrayHasKey('order', $data); } @@ -54,7 +52,6 @@ class WC_Retailcrm_Order_Payment_Test extends WC_Retailcrm_Test_Case_Helper public function test_build_with_amount($externalId) { $settings = $this->getOptions(); - $settings['send_payment_amount'] = 'yes'; $order_payment = new WC_Retailcrm_Order_Payment($settings); $data = $order_payment->build($this->order, $externalId)->get_data(); @@ -66,7 +63,6 @@ class WC_Retailcrm_Order_Payment_Test extends WC_Retailcrm_Test_Case_Helper } $this->assertArrayHasKey('type', $data); - $this->assertArrayHasKey('amount', $data); $this->assertArrayHasKey('order', $data); } diff --git a/tests/test-wc-retailcrm-orders.php b/tests/test-wc-retailcrm-orders.php index b13b964..888a4d5 100644 --- a/tests/test-wc-retailcrm-orders.php +++ b/tests/test-wc-retailcrm-orders.php @@ -204,12 +204,7 @@ class WC_Retailcrm_Orders_Test extends WC_Retailcrm_Test_Case_Helper $this->assertArrayHasKey('order', $payment); $this->assertArrayHasKey('externalId', $payment); $this->assertEquals('payment1', $payment['type']); - - if (!empty($this->options['send_payment_amount']) && $this->options['send_payment_amount'] == 'yes') { - $this->assertArrayHasKey('amount', $payment); - } else { - $this->assertArrayNotHasKey('amount', $payment); - } + $this->assertArrayNotHasKey('amount', $payment); } else { $this->assertEquals(array(), $payment); }