0

I have this custom payment method:

<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
    <div class="payment-method-title field choice">
        <input type="radio"
               name="payment[method]"
               class="radio"
               data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
        <label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>

    <div class="payment-method-content">
        <div class="payment-method-billing-address">
            <!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
            <!-- ko template: getTemplate() --><!-- /ko -->
            <!--/ko-->
        </div>
        
        <div class="checkout-agreements-block">
            <!-- ko foreach: $parent.getRegion('before-place-order') -->
            <!-- ko template: getTemplate() --><!-- /ko -->
            <!--/ko-->
        </div>
        
        <div class="actions-toolbar">
            <div class="primary">
                <button class="action primary checkout"
                        type="submit"
                        data-bind="
                        click: placeOrder,
                        attr: {title: $t('Place Order')},
                        css: {disabled: !isPlaceOrderActionAllowed()},
                        enable: (getCode() == isChecked())
                        "
                        disabled>
                    <span data-bind="i18n: 'Place Order'"></span>
                </button>
            </div>
        </div>
    </div>
</div>

Everything works fine but it does not show the billing address selector, see red square below from other payment method:

enter image description here

Any clue on why this is happening?

Thanks !

1 Answer 1

0

Ok just found the problem.... On my checkout_index_index.xml I was misisng this( see code bewtween **):

  <item name="PagamentoTransferenciaBancaria" xsi:type="array">
 <item name="component" xsi:type="string">vendor_module/js/view/payment/pagamentotransferenciabancaria-renderer</item>
 <item name="methods" xsi:type="array">
 **
     <item name="PagamentoTransferenciaBancaria" xsi:type="array">
       <item name="isBillingAddressRequired" xsi:type="boolean">true</item>
    </item>**
 </item>
 </item>  

         
1
  • can you add full code?
    – Mohit Rane
    Jun 14, 2023 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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