I am working on a payment gateway that doesn’t allow “?” in Callback URLs. This payment gateway has to be integrated with WordPress + Woocommerce.

My callback URL seems to be

http://localhost/payment/index.php/my-account/?wc-api=WC_Gateway_Abc

I want to use it in a different way so payment gateway doesn’t give an error. Here is an example:

http://localhost/payment/index.php/my-account/wc-api/WC_Gateway_Abc

and later, I want to rewrite it using htaccess when payment gateway sends back response to WordPress site so WordPress file can execute the response.

Apparently, only

?wc-api=WC_Gateway_Abc

part should be re-writable.

Any hints for htaccess rewrite condition?

Read more here: Rewrite URL for Payment Gateway


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: