1

I have created a new payment method.

In system configuration, I have set that the new order status as Pending, however, when I place the order, the new order is created in Processing status.

Here is my system.xml code.

   <system>
        <section id="payment">
            <group id="zipcodpayment" translate="label" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Custom Payment</label>
                <field id="active" translate="label comment" sortOrder="1" type="select" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Title</label>
                </field>
                <field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>New Order Status</label>
                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\NewStatus</source_model>
                </field>             
                <field id="allowspecific" translate="label" type="allowspecific" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Payment from Applicable Countries</label>
                    <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
                </field>
                <field id="specificcountry" translate="label" type="multiselect" sortOrder="41" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Payment from Specific Countries</label>
                    <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                    <can_be_empty>1</can_be_empty>
                </field>
            </group>
        </section>
    </system> 

Please help.

  • Need to add full code lines of your system.xml config. – Khoa TruongDinh Dec 14 '16 at 6:53
  • I edited my code,could you please check it... – D.T Dec 15 '16 at 7:07
  • Your payment is offline or online payment? – Khoa TruongDinh Dec 15 '16 at 7:15
  • its an offline payment method. – D.T Dec 15 '16 at 7:17
  • Try to find the status in core_config_data table: SELECT * FROM core_config_data a WHERE a.path LIKE '%payment/zipcodpayment/order_status%' – Khoa TruongDinh Dec 15 '16 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.