0

It seems there are many resources on how to add a payment method to the checkout process, but I try to add the payment method options form to a page that is not in the checkout process. I can display general details about the available payment methods using paymentHelper->getPaymentMethods returned from my block object (which has the quote).

If I attempt to render the options via paymentHelper->getMethodFormBlock and toHtml, the result is empty or error (indicating that the get quote method returned null).

Is there a simple way to include the payment method options radio form on a different page? Like...

require([
    'jquery',
    'Magento_Checkout/js/view/payment/default'
    ],
    function ($, paymentComponent) {
        renderList('#myDivElement');
    });
New contributor
Jacob is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Jacob is a new contributor. Be nice, and check out our Code of Conduct.

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.