5
Magento 1.9.4
Porto theme

We urgently need to modify either the 'Bank Transfer Payment' payment method or the 'Cash On Delivery' payment method. What we are after is:

  1. label the existing form text field

and

  1. add 2 more drop-down type form fields

How can this be done so that it captures the information and adds it to the order?


UPDATED on February 18th:

It should look like this:

enter image description here

Without the "What is this?" link (we do not need that).


UPDATED on February 19th, 2019:

The solution proposed by mydons seems to work except for:

it does not show the CVV code on the order itself in the Admin panel even-though this option was selected in the Admin panel and filled out by customer:

  1. I selected the Request Card Security Code = YES in the Admin panel:

enter image description here

it does show on the front end fine - it even has 'Card Verification Number' field for the CVV code and a link to 'What is this?' (which works BTW - it shows a photo of where to find the CVV code):

enter image description here

But on the order it looks like this (no CVV information):

enter image description here

  • Can you please specify more details, what fields you are planning to capture, if possible include a screenshot – mydons Feb 18 at 17:35
  • @mydons I updated the original post above. Thank you. – Allysin Feb 18 at 17:41
1

For your above requirement you can use SavedCC Payment Method.

But it looks like this built-in offline payment method has been removed in version 1.9.4

We can Enable it again by replacing with previous version. But editing core file is not a best practice. So i have created a custom module to override the core xml file.

Step 1: Create file app\etc\modules\Mydons_Savedcc.xml

<?xml version="1.0"?>
 <config>
   <modules>
    <Mydons_Savedcc>
        <active>true</active>
        <codePool>local</codePool>
        <depends>
            <Mage_Payment/>
        </depends>
    </Mydons_Savedcc>
  </modules>
</config>

Step 2: Create file app\code\local\Mydons\Savedcc\etc\config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Mydons_Savedcc>
        <version>1.0.0</version>
    </Mydons_Savedcc>
  </modules>
<default>
    <payment>
        <ccsave>
            <active>1</active>
            <cctypes>AE,VI,MC,DI</cctypes>
            <model>payment/method_ccsave</model>
            <order_status>pending</order_status>
            <title>Credit Card (Saved)</title>
            <allowspecific>0</allowspecific>
            <group>offline</group>
        </ccsave>
     </payment>
 </default>
 </config>

Step 3: Create file app\code\local\Mydons\Savedcc\etc\system.xml

<?xml version="1.0"?>
<config>
  <sections>
    <payment translate="label" module="payment">
        <label>Payment Methods</label>
        <tab>sales</tab>
        <frontend_type>text</frontend_type>
        <sort_order>400</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
        <groups>
                <ccsave translate="label">
                <label>Saved CC</label>
                <frontend_type>text</frontend_type>
                <sort_order>27</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <active translate="label">
                        <label>Enabled</label>
                        <frontend_type>select</frontend_type>
                       <source_model>
                        adminhtml/system_config_source_yesno
                       </source_model>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </active>
                    <cctypes translate="label">
                        <label>Credit Card Types</label>
                        <frontend_type>multiselect</frontend_type>
                        <source_model>
                         adminhtml/system_config_source_payment_cctype
                      </source_model>
                        <sort_order>4</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                        <can_be_empty>1</can_be_empty>    
                    </cctypes>
                    <order_status translate="label">
                        <label>New Order Status</label>
                        <frontend_type>select</frontend_type>
                       <source_model>
                          adminhtml/system_config_source_order_status_new
                       </source_model>
                        <sort_order>2</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </order_status>
                    <sort_order translate="label">
                        <label>Sort Order</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>100</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                        <frontend_class>validate-number</frontend_class>
                    </sort_order>
                    <title translate="label">
                        <label>Title</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </title>
                    <useccv translate="label">
                        <label>Request Card Security Code</label>
                        <frontend_type>select</frontend_type>
                        <source_model>
                           adminhtml/system_config_source_yesno
                        </source_model>
                        <sort_order>5</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </useccv>
                    <centinel translate="label">
                        <label>3D Secure Card Validation</label>
                        <frontend_type>select</frontend_type>
                       <source_model>
                        adminhtml/system_config_source_yesno
                       </source_model>
                        <sort_order>20</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </centinel>
                    <centinel_is_mode_strict translate="label comment">
                        <label>Severe 3D Secure Card Validation</label>
                        <comment>Severe validation removes chargeback </comment>
                        <frontend_type>select</frontend_type>
                        <source_model>
                          adminhtml/system_config_source_yesno
                       </source_model>
                        <sort_order>25</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                        <depends><centinel>1</centinel></depends>
                    </centinel_is_mode_strict>
                    <centinel_api_url translate="label comment">
                        <label>Centinel API URL</label>
                        <comment>A value is required for live mode.</comment>
                        <frontend_type>text</frontend_type>
                        <source_model>
                          adminhtml/system_config_source_yesno
                        </source_model>
                        <sort_order>30</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                        <depends><centinel>1</centinel></depends>
                    </centinel_api_url>
                     <allowspecific translate="label">
                        <label>Payment from Applicable Countries</label>
                        <frontend_type>allowspecific</frontend_type>
                        <sort_order>50</sort_order>                            
                        <source_model>
                         adminhtml/system_config_source_payment_allspecificcountries
                        </source_model>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </allowspecific>
                    <specificcountry translate="label">
                        <label>Payment from Specific Countries</label>
                        <frontend_type>multiselect</frontend_type>
                        <sort_order>51</sort_order>
                        <source_model>
                          adminhtml/system_config_source_country
                        </source_model>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                        <can_be_empty>1</can_be_empty>
                    </specificcountry>
                    <min_order_total translate="label">
                        <label>Minimum Order Total</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>98</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </min_order_total>
                    <max_order_total translate="label">
                        <label>Maximum Order Total</label>
                        <frontend_type>text</frontend_type>
                        <sort_order>99</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>0</show_in_store>
                    </max_order_total>
                    <model></model>
                </fields>
            </ccsave>
        </groups>
    </payment>
</sections>
</config>

Note:- Important! Saving customer card data is discouraged unless absolutely necessary. Even though the data is encrypted, being in possession of the data increases your security risk. In future try to switch to PCI Compliant payment gateway

  • Thank you for this. I created all directories and files according to the steps you outlined, logged out and logged back in, re-indexed, cleared all Cache but I am unable to find this as a payment option in the Admin panel under Payment Methods. Is there something I'm doing wrong? – Allysin Feb 19 at 16:23
  • I'm so sorry - I put the folders and files in the wrong app folder (I was doing it via the File Manager through cPanel instead of FTP and put it under root instead of public_html). I will test it a bit more but I think it will work! – Allysin Feb 19 at 16:33
  • I placed a test order and it worked EXCEPT for - I selected the Request Card Security Code = YES in the Admin panel --) it does show on the front end fine - it even has 'Card Verification Number' field for the CVV code and a link to 'What is this?' (which works BTW - it shows a photo of where to find the CVV code) but when order is submitted, it does not show the CVV code on the order itself in the Admin panel. – Allysin Feb 19 at 16:57
  • Magento SavedCC Payment method by default will not store CVV code for security reason. Earlier there was a community extension which saves the CVV code and once the order is processed it will provide option to purge the credit card number. But currently when i searched for this extension it is either corrupted or not available. Please find the link below where i find the extension magecloud.net/marketplace/extension/extended-ccsave – mydons Feb 20 at 7:31
  • I'm so sorry I thought the bounty would just automatically be awarded to you since yours was the only answer on here but I guess that's not the case as per here: meta.stackexchange.com/questions/95039/… Again - sorry about that - I was traveling and was not paying attention. – Allysin Feb 27 at 16:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.