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.
P.S: This is a plugin so I can't change Wordpress files outside my Plugin directory.
Any hints for htaccess rewrite condition?