President Cyril Ramaphosa has responded to US president Donald Trump’s threats to pull funding from South Africa.