• Resolved fakemeta

    (@fakemeta)


    Hello,

    Currently this plugin uses the value of get_bloginfo('wpurl') to build Paysera payment request callback url. Please refer to PayseraPaymentRequest::buildParameters method.

    The call to get_bloginfo('wpurl') is basically and equivalent of calling get_site_url() function which is not the best function to use for any frontend urls, including API endpoints. This value is mostly used in admin area, while get_home_url() is used for any front-facing urls.

    WooCommerce itself uses get_home_url() to build it’s own wc-api urls. Please refer to it’s source code: https://github.com/woocommerce/woocommerce/blob/3c9d1353e5b0b30c4613b158ce471cd7b9933472/plugins/woocommerce/includes/wc-core-functions.php#L1070

    We are using custom multilingual solution for some websites which appends language code to all frontend urls. This is done via home_url filter because this is the only correct way to do it.

    We also redirect user from root url to default language. I.e. https://example.com is redirected to https://example.com/en/.

    Since this plugin uses site_url option to build it’s callback url, the callback is being sent to root url (i.e. https://example.com/?wc-api=wc_gateway_paysera) which is then redirected to https://example.com/en/?wc-api=wc_gateway_paysera which might not be the language version that user used during checkout. For example if user placed an order via estonian version, the callback will be sent to root url without language code and then redirected to english version. This might cause some inconsistencies in our custom workflow and that tiny redirect is also bothering me.

    Please consider using home_url or get_home_url functions for building callback requests instead of get_bloginfo('wpurl') or please make callbackurl value filterable via WordPress hooks so we can adjust the value ourselves.

    Best Regards,
    Roman

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author paysera

    (@paysera)

    Hello,

    thanks for your ideas.

    We will review your offer and depending on the decisions taken we will make some improvements.

    Have a nice day!

    Plugin Author paysera

    (@paysera)

    Hello,

    The issue was resolved in version 3.2.2, we used home_url, thank you again for your ideas.

    Have a nice day!

    Thread Starter fakemeta

    (@fakemeta)

    Thank you!

    Best Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Payment callback url’ is closed to new replies.