• Resolved Muslim

    (@immuslim)


    First of all I would like to say thanks for making this plugin available. May Allah bless you.

    I’ve installed your plugin before the latest update and everything seemed to be working just fine all the way up to the coinbase commerce checkout page and I got real excited when I saw that you just added the awesome webhook feature. Unfortunately I’m experiencing an error though.

    The URL provided in the settings pages just returns an error:
    https://mysite.com?rest_route=/ccfwc/v1/complete-payment returns:
    {"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}

    If I remove “complete-payment” from the URL then the route seems to be working just fine. This is what it’s returning:

    {"namespace":"ccfwc\/v1","routes":{"\/ccfwc\/v1":{"namespace":"ccfwc\/v1","methods":["GET"],"endpoints":[{"methods":["GET"],"args":{"namespace":{"default":"ccfwc\/v1","required":false},"context":{"default":"view","required":false}}}],"_links":{"self":[{"href":"https:\/\/mysite.com\/wp-json\/ccfwc\/v1"}]}},"\/ccfwc\/v1\/complete-payment":{"namespace":"ccfwc\/v1","methods":["POST"],"endpoints":[{"methods":["POST"],"args":[]}],"_links":{"self":[{"href":"https:\/\/mysite.com\/wp-json\/ccfwc\/v1\/complete-payment"}]}}},"_links":{"up":[{"href":"https:\/\/mysite.com\/wp-json\/"}]}}

    I also tried sending a webhook test for “charged:confirmed” in https://commerce.coinbase.com/dashboard/settings it’s showing the same response: Remote server at framework.indomodeinternational.com returned an HTTP 404.

    I hope it’s an easy fix. Regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Syed Muhammad Usman

    (@smusman98)

    Thanks for your love and support.
    Can you share your permalink settings?
    Also make sure you’re using all steps (followed in screenshots) to setup webhook.

    Thread Starter Muslim

    (@immuslim)

    Sure, here’s a screenshot of my permalink settings: Removed screenshot.

    Yes I followed all the steps in your screenshots.

    • This reply was modified 2 years, 9 months ago by Muslim. Reason: Remove screenshot
    Thread Starter Muslim

    (@immuslim)

    Update! I realized your route accepts the POST method therefor I can’t test it in chrome.

    I did a quick test with the webhook payload example from https://commerce.coinbase.com/docs/api/#webhooks in Postman and everything seems to be working just fine.

    I’m pretty sure the reason the test via coinbase commerce dashboard is getting a 404 response is because that is actually what your plugin API route returns when there is no order associated with the ID and the coinbase test doesn’t show the message:

    {
        "message": "No order associated with this ID."
    }

    Sorry for the false alarm. Have a great day.

    • This reply was modified 2 years, 9 months ago by Muslim. Reason: Marking as resolved
    Plugin Author Syed Muhammad Usman

    (@smusman98)

    Hi,
    Use this plugin https://drive.google.com/file/d/1Uqys3VISNsBZbrK6L0CTg-pAU_JGX1qP/view?usp=sharing, If it resolves your issue, Let us know we’ll release this build.
    Thanks

    Thread Starter Muslim

    (@immuslim)

    Sorry for the late reply. Yes, I can confirm it is working fine now. Thank you very much.

    Thread Starter Muslim

    (@immuslim)

    I have a new update. The plugin doesn’t seem to be updating the order status correctly via the webhook.

    I decided to dig into your plugin files and found the webhook file at commerce-coinbase-for-woocommerce/includes/webhook.php

    The first thing that came to my mind was to try and call global $woocommerce; on line 50 right before $order = new WC_Order( $order_id ); and voila! The order status is updating just fine now.

    I hope this information is somehow helpful. Best regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘New Webhook URL 404’ is closed to new replies.