How Ultimate affilate pro setting

Hello, who may can help us?
we use the affilate, and what we want to set it :
once A refer to B, and B make payment then A will get a commission,but the systerm is B registerd then A get a commission, pls help me check if the setting wrong or how to set it?