• Resolved miroslavps

    (@miroslavps)


    Hi to all!

    I support a payment gateway plugin. It works well with shortcodes and event with latest version of WP and WC if you use it on older site and did upgraded. The problem is with the clean install with WC after v 8.2 and the blocks.

    I read few tutorials how to integrate my plugin with the blocks – https://rudrastyh.com/woocommerce/checkout-block-payment-method-integration.html and https://sevengits.com/woocommerce-checkout-blocks/, searched in this site, also checked how COD and few more GWs works, but no success.

    I added declaration for blocks support, created block-integration class and js file.

    I use clean install with default theme, WC and my plugin. Only my plugin is enabled. When go to theme template editor I see my gateway when it is enabled:

    But at same time I see warning that my gateway does not support Blocks:

    On the checkout page my gateway is missing, but if I call in the console wcSettings.paymentMethodData it is there as only payment method with all of its data, as I set it.

    Any hints or directions what to check or do now?

    Regards!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @miroslavpsm

    You have already done much work trying to integrate your payment gateway plugin with the WooCommerce checkout block. I appreciate your diligence in attempting to resolve this issue.

    The problem might be related to how your payment gateway is registered with WooCommerce Blocks. Here are further resources that might help you to integrate your gateway correctly:

    Also, please ensure the following:

    1. Your payment gateway is correctly registered with the registerPaymentMethod() function in your JavaScript file.
    2. The canMakePayment property is set correctly. This property should return a boolean value that determines whether the payment method is available for use or not. It could prevent your payment gateway from appearing on the checkout page if it’s not set correctly.

    If you have verified these aspects and the issue persists, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question.

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter miroslavps

    (@miroslavps)

    Thank you for the response!

    I will follow your recommendations and hope to solve the problem and share the solution.

    Regards!

    Thread Starter miroslavps

    (@miroslavps)

    At the end I found my error. The catch is when you set you block javascript – gatewayBlockOptions.name must be same as the id parameter form main gateway class.

    I hope this will spend someone few hours ??

    Hey, @miroslavps!

    I’m glad you were able to find the issue and thank you for contributing to the WooCommerce community and sharing the solution here. ??

    I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Have a wonderful day!

    @miroslavps Thanks for the answer, I was also stuck because of this issue.

    I guess they should show an error message when something like this happens, wasted a whole day figuring this out.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Payment Gateway Blocks support’ is closed to new replies.