diff --git a/tests/phpunit/tests/test-methods.php b/tests/phpunit/tests/test-methods.php index c2bbd602..e585b76f 100755 --- a/tests/phpunit/tests/test-methods.php +++ b/tests/phpunit/tests/test-methods.php @@ -102,7 +102,6 @@ public function testReceiptPage() $orderId = $order->get_id(); $this->instance->shouldReceive('autoEnableWebhook'); - echo 'orderId in testReceiptPage: '.$orderId; $razorpayOrderId=$this->instance->shouldReceive('createOrGetRazorpayOrderId')->andReturn('order_test'); $this->instance->shouldReceive('getRazorpayApiPublicInstance')->andReturnUsing(function () { diff --git a/tests/phpunit/tests/test-order-methods.php b/tests/phpunit/tests/test-order-methods.php index 33f3d0e5..96343a22 100644 --- a/tests/phpunit/tests/test-order-methods.php +++ b/tests/phpunit/tests/test-order-methods.php @@ -289,14 +289,6 @@ public function testProcessRefund() function () { return new MockApi('key_id_2', 'key_secret2'); }); - if(! $order) - { - echo 'order is null'; - } - if(! $order->get_transaction_id()) - { - echo 'order transaction_id is null: '.$order->get_transaction_id(); - } $response = $this->instance->process_refund($wcOrderId, 25.25, "not interested anymore"); diff --git a/woo-razorpay.php b/woo-razorpay.php index 626cd803..c13ca6d0 100644 --- a/woo-razorpay.php +++ b/woo-razorpay.php @@ -950,8 +950,6 @@ public function createOrGetRazorpayOrderId($order, $orderId, $is1ccCheckout = 'n global $woocommerce; rzpLogInfo("createOrGetRazorpayOrderId $orderId and is1ccCheckout is set to $is1ccCheckout"); - echo "createOrGetRazorpayOrderId " . $orderId . " and is1ccCheckout is set to " . $is1ccCheckout; - $create = false; if($is1ccCheckout == 'no') @@ -1052,7 +1050,6 @@ protected function getRazorpayPaymentParams($order, $orderId) rzpLogInfo("getRazorpayPaymentParams $orderId"); $razorpayOrderId = $this->createOrGetRazorpayOrderId($order, $orderId); - echo 'createOrGetRazorpayOrderId with order: ' . json_encode($order) . ' and orderId: ' . $orderId . ' and $razorpayOrderId: ' . $razorpayOrderId; if ($razorpayOrderId === null) { @@ -1077,12 +1074,10 @@ protected function getRazorpayPaymentParams($order, $orderId) public function generate_razorpay_form($orderId) { $order = wc_get_order($orderId); - echo 'generate_razorpay_form with orderId: ' . $orderId . ' and order: ' . json_encode($order); try { $params = $this->getRazorpayPaymentParams($order, $orderId); - echo '$params from getRazorpayPaymentParams: ' . json_encode($params); } catch (Exception $e) { @@ -1523,18 +1518,14 @@ public function process_refund($orderId, $amount = null, $reason = '') { $order = wc_get_order($orderId); - echo 'process refund: line 1526: orderId: '.$orderId.' amount: '.$amount.' reason: '.$reason; - if (! $order or ! $order->get_transaction_id()) { return new WP_Error('error', __('Refund failed: No transaction ID', 'woocommerce')); } - echo 'process refund: line 1532'; $client = $this->getRazorpayApiInstance(); $paymentId = $order->get_transaction_id(); - echo 'process refund: line 1538: paymentId: '.$paymentId; $data = array( 'amount' => (int) round($amount * 100), @@ -1554,10 +1545,7 @@ public function process_refund($orderId, $amount = null, $reason = '') if (isset($refund) === true) { - echo 'process refund: line 1559'; - $order->add_order_note(__('Refund Id: ' . $refund->id, 'woocommerce')); - echo 'process refund: line 1562'; /** * @var $refund ->id -- Provides the RazorPay Refund ID @@ -1565,7 +1553,6 @@ public function process_refund($orderId, $amount = null, $reason = '') * @var $refund -> WooCommerce Refund Instance. */ do_action('woo_razorpay_refund_success', $refund->id, $orderId, $refund); - echo 'process refund: line 1570'; rzpLogInfo('Refund ID = ' . $refund->id . ' , Refund speed requested = ' . $refund->speed_requested . @@ -1576,7 +1563,6 @@ public function process_refund($orderId, $amount = null, $reason = '') } catch(Exception $e) { - echo 'error message: line 1582: '.$e->getMessage(); return new WP_Error('error', __($e->getMessage(), 'woocommerce')); } }