• Resolved srivat

    (@srivat)


    Hi,

    I’m trying to build a custom payment plugin for WooCommerce and I’ve used the follwing document, https://developer.woocommerce.com/2022/07/07/exposing-payment-options-in-the-checkout-block/ .

    Now, I’m trying to modify the class-wc-gateway-dummy.php to add payment fields at the checkout. So, the user can enter their paystring. The function below is what I added:

    public function payment_fields() {
    echo ‘<div id=”custom_payment_fields”><h3>’ . __(‘Pago Pay Details’) . ‘</h3>’;

    woocommerce_form_field(‘pago_pay_string’, array(
    ‘type’ => ‘text’,
    ‘class’ => array(‘form-row-wide’),
    ‘label’ => __(‘Pago Pay String’),
    ‘placeholder’ => __(‘Enter your Pago Pay String’),
    ));

    woocommerce_form_field(‘total_amount’, array(
    ‘type’ => ‘number’,
    ‘class’ => array(‘form-row-wide’),
    ‘label’ => __(‘Total Amount’),
    ‘placeholder’ => __(‘Enter the Total Amount’),
    ));

    echo ‘</div>’;
    }

    However, I do not see any text option during checkout to enter the pay string. Can you help me figure out what is missing. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @srivat

    For reference, this particular forum is meant for general support with the core functionality of WooCommerce itself. For development and custom coding questions, it’s best to ask for insight related to those on either the WooCommerce Advanced Facebook group or the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get some further insight/information.

    Thread Starter srivat

    (@srivat)

    Thank you for your response. I did post my question on the WooCommerce Slack team and have not gotten any response in 3 days. So I posted here hoping to get some help.

    Plugin Support Rajesh K. (woo-hc)

    (@rajeshml)

    Hello @srivat,

    Thank you for reaching out for assistance and taking the initiative to post your query in the WooCommerce Slack community. 

    Since it’s often a busy channel with many conversations, your message may have gone unnoticed. It can sometimes help to repost your question at a different time of day when other members might be more active.

    I’m going to leave this thread open for a bit to see if any fellow community member is able to chime in and help you out.

    Thanks!

    Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @srivat

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!

    If you have further questions, please feel free to open a new topic.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WooCommerce Custom Payment Plugin’ is closed to new replies.