<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_payment_in_stacks(state_engine, nameop, state_op_type, fee_block_id):
 """ Verify that if tokens were paid for a name priced in BTC, that enough were paid. Does not check account balances or namespace types; it only inspects the transaction data. Returns {'status': False} on error """

    name = nameop['name']
    namespace_id = get_namespace_from_name(name)
    name_without_namespace = get_name_from_fq_name(name)
    namespace = state_engine.get_namespace( namespace_id )

    stacks_payment_info = get_stacks_payment(state_engine, nameop, state_op_type)
    if stacks_payment_info['status']:
        # got a stacks payment! check price and make sure we paid the right amount
        tokens_paid = stacks_payment_info['tokens_paid']
        token_units = stacks_payment_info['token_units']

        log.debug('Transaction pays {} units of {} for {}, even though its namespace was priced in BTC'.format(tokens_paid, token_units, name))
        
        stacks_price = price_name_stacks(name_without_namespace, namespace, fee_block_id)   # price in Stacks, but following the BTC-given price curve
        res = check_token_payment(name, stacks_price, stacks_payment_info)
        if res['status']:
            # success
            return {'status': True, 'tokens_paid': tokens_paid, 'token_units': token_units}

    return {'status': False}