0

Currently i have successfully implemented a custom payment method into Magento 2. However the cc-form build into Magento 2 does not include Cardholder Name or a similar field. As such I changed this code:

        <form class="form" data-bind="attr: {'id': getCode() + '-form'}">
            <div class="form-group">
                <label class="formLabel" style="font-weight:bold;" for="code_cc_name">Name On Card <span style="color:red">*</span></label>
                <input class="form-control" style="width:225px;" name="payment[cc_name]" type="text" data-bind="attr: {'id': getCode()+'_cc_name'}" required />
            </div> 
            <!-- ko template: 'Magento_Payment/payment/cc-form' --><!-- /ko -->
        </form>

What are the steps to take to add this field to the form so it is sent to the model of the Extension(getData, getAdditionalData, etc.)?

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.