Title: Payment callback url
Last modified: March 9, 2022

---

# Payment callback url

 *  Resolved [fakemeta](https://wordpress.org/support/users/fakemeta/)
 * (@fakemeta)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/payment-callback-url/)
 * 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](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](https://example.com)
   is redirected to [https://example.com/en/](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](https://example.com/?wc-api=wc_gateway_paysera))
   which is then redirected to [https://example.com/en/?wc-api=wc_gateway_paysera](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](https://wordpress.org/support/users/paysera/)
 * (@paysera)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/payment-callback-url/#post-15441967)
 * 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](https://wordpress.org/support/users/paysera/)
 * (@paysera)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/payment-callback-url/#post-15531787)
 * 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](https://wordpress.org/support/users/fakemeta/)
 * (@fakemeta)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/payment-callback-url/#post-15532487)
 * Thank you!
 * Best Regards

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

 The topic ‘Payment callback url’ is closed to new replies.

 * ![](https://ps.w.org/woo-payment-gateway-paysera/assets/icon.svg?rev=2698285)
 * [Paysera Payment Gateway for WooCommerce](https://wordpress.org/plugins/woo-payment-gateway-paysera/)
 * [Support Threads](https://wordpress.org/support/plugin/woo-payment-gateway-paysera/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-payment-gateway-paysera/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-payment-gateway-paysera/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-payment-gateway-paysera/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [fakemeta](https://wordpress.org/support/users/fakemeta/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/payment-callback-url/#post-15532487)
 * Status: resolved