I had big problems with a German company. I am Algerian, working in Cameroun, and I did not want to pay German tax or German payroll tax.
I looked on internet and found Adexpat, and I am happy with the way it works.
They employ me, they invoice the German company and they pay me where I ask.
And they only charge a fixed fee.