'Simulate a response from the credit provider approving
or rejecting the credit request.
Arguments:
request_uuid (str): The UUID of the credit request.
status (str): The status of the credit request.
Keyword Arguments:
provider_id (str): Identifier for the credit provider.
secret_key (str): Shared secret key for signing messages.
timestamp (datetime): Timestamp of the message.
sig (str): Digital signature to use on messages.
keys (dict): Override for CREDIT_PROVIDER_SECRET_KEYS setting.'

def _credit_provider_callback(self, request_uuid, status, **kwargs):

    provider_id = kwargs.get(u'provider_id', self.provider.provider_id)
    secret_key = kwargs.get(u'secret_key', u'931433d583c84ca7ba41784bad3232e6')
    timestamp = kwargs.get(u'timestamp', to_timestamp(datetime.datetime.now(pytz.UTC)))
    keys = kwargs.get(u'keys', {self.provider.provider_id: secret_key})
    url = reverse(u'credit:provider_callback', args=[provider_id])
    parameters = {u'request_uuid': request_uuid, u'status': status, u'timestamp': timestamp}
    parameters[u'signature'] = kwargs.get(u'sig', signature(parameters, secret_key))
    with override_settings(CREDIT_PROVIDER_SECRET_KEYS=keys):
        return self.client.post(url, data=json.dumps(parameters), content_type=JSON)
