The verb pagare has the curious, but by no means unique, feature that it can be construed in more than one way: it may admit as a direct object any of the following:
- the person being paid: Ho pagato Gigi per portarmi a spasso il cane
- the amount of money being paid: Ho pagato un sacco di soldi per potermene stare in santa pace
- the object being paid for: Ho pagato questa macchina trentamila euro (see another question)
(I believe that the two first constructions hold for English too, but this is beside the point.)
So, the first of the sentences in the question, Ti pagheremo per lavorare may be, a bit awkwardly, rephrased Pagheremo te per lavorare (as in the Gigi example), and “ti” (or “Gigi”) is the direct object.
The sentence Ti pagheremo un salario per lavorare, on the other hand, can be rephrased as Pagheremo a te un salario per lavorare, so the direct object is “un salario” here.
The misleading detail is that the pronoun ti is, “accidentally”, both the dative and the accusative form of tu. It all would be different in the third person, or with a noun:
Lo pagheremo per lavorare
versus
Gli pagheremo un salario per lavorare
or
Pagheremo Gigi per lavorare
versus
Pagheremo un salario a Gigi per lavorare.