From 7cf585c8da61efa078d09ea0bc0d3874563cbbe6 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 25 Jan 2019 19:44:07 +0530 Subject: [PATCH] Fixed issue #390 --- .../Payment/src/Config/paymentmethods.php | 3 -- packages/Webkul/Payment/src/Config/system.php | 42 ------------------- .../src/Repositories/OrderRepository.php | 2 +- 3 files changed, 1 insertion(+), 46 deletions(-) diff --git a/packages/Webkul/Payment/src/Config/paymentmethods.php b/packages/Webkul/Payment/src/Config/paymentmethods.php index 477e64792..bfd1ae357 100755 --- a/packages/Webkul/Payment/src/Config/paymentmethods.php +++ b/packages/Webkul/Payment/src/Config/paymentmethods.php @@ -5,7 +5,6 @@ return [ 'title' => 'Cash On Delivery', 'description' => 'Cash On Delivery', 'class' => 'Webkul\Payment\Payment\CashOnDelivery', - 'order_status' => 'pending', 'active' => true ], @@ -14,7 +13,6 @@ return [ 'title' => 'Money Transfer', 'description' => 'Money Transfer', 'class' => 'Webkul\Payment\Payment\MoneyTransfer', - 'order_status' => 'pending', 'active' => true ], @@ -23,7 +21,6 @@ return [ 'title' => 'Paypal Standard', 'description' => 'Paypal Standard', 'class' => 'Webkul\Paypal\Payment\Standard', - 'order_status' => 'pending_payment', 'sandbox' => true, 'active' => true, 'business_account' => 'test@webkul.com' diff --git a/packages/Webkul/Payment/src/Config/system.php b/packages/Webkul/Payment/src/Config/system.php index 9eddc97e2..aad63364d 100755 --- a/packages/Webkul/Payment/src/Config/system.php +++ b/packages/Webkul/Payment/src/Config/system.php @@ -27,20 +27,6 @@ return [ 'type' => 'textarea', 'channel_based' => false, 'locale_based' => true - ], [ - 'name' => 'order_status', - 'title' => 'Order Status', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'Pending', - 'value' => 'pending' - ], [ - 'title' => 'Pending Payment', - 'value' => 'pending_payment' - ] - ], - 'validation' => 'required' ], [ 'name' => 'active', 'title' => 'Status', @@ -75,20 +61,6 @@ return [ 'type' => 'textarea', 'channel_based' => false, 'locale_based' => true - ], [ - 'name' => 'order_status', - 'title' => 'Order Status', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'Pending', - 'value' => 'pending' - ], [ - 'title' => 'Pending Payment', - 'value' => 'pending_payment' - ] - ], - 'validation' => 'required' ], [ 'name' => 'active', 'title' => 'Status', @@ -123,20 +95,6 @@ return [ 'type' => 'textarea', 'channel_based' => false, 'locale_based' => true - ], [ - 'name' => 'order_status', - 'title' => 'Order Status', - 'type' => 'select', - 'options' => [ - [ - 'title' => 'Pending', - 'value' => 'pending' - ], [ - 'title' => 'Pending Payment', - 'value' => 'pending_payment' - ] - ], - 'validation' => 'required' ], [ 'name' => 'business_account', 'title' => 'Business Account', diff --git a/packages/Webkul/Sales/src/Repositories/OrderRepository.php b/packages/Webkul/Sales/src/Repositories/OrderRepository.php index 7812ea192..3b8cd1a1e 100755 --- a/packages/Webkul/Sales/src/Repositories/OrderRepository.php +++ b/packages/Webkul/Sales/src/Repositories/OrderRepository.php @@ -78,7 +78,7 @@ class OrderRepository extends Repository unset($data['channel']); } - $data['status'] = core()->getConfigData('sales.paymentmethods.' . $data['payment']['method'] . '.order_status') ?? 'pending'; + $data['status'] = 'pending'; $order = $this->model->create(array_merge($data, ['increment_id' => $this->generateIncrementId()]));