It seems there are many resources on how to add a payment method to the checkout process, but I trying 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 getQuote method returned null).
Is there a simple way to include the payment method options radio form on a different page? maybe like…
require(['jquery', 'Magento_Checkout/js/view/payment/default'],
function ($, paymentComponent) {
renderList('#myDivElement');
});