It is my opinion that the anointing at Bethany took place before Jesus' triumphant entry into Jerusalem on Sunday. Thus, the order of John's account here seems to be chronologically correct. In other words, what is recorded in Matthew 26:6-13 actually took place four days earlier. There is an interesting theory as to why Matthew and Mark included those verses where they did. Four days earlier, Jesus had spoken against Judas' hypocritical words toward Mary (cf. John 12:4-7). It seems very likely that Judas took the matter personally and decided to betray Jesus out of vengeance (and perhaps out of a covetous desire to recoup "his" loss from the spikenard that Mary had "wasted"). Some reason that Matthew and Mark report that incident here to remind us of another possible motive for Judas' treachery (besides covetousness).
"Then one of the twelve, called Judas Iscariot, went to the chief priests and said, 'What are you willing to give me if I deliver Him to you?' And they counted out to him thirty pieces of silver. So from that time he sought opportunity to betray Him" (Matt. 26:14-16). Luke 22:3 also adds - "Then Satan entered Judas." Certainly this is not a literal entering, for Judas was not demon-possessed. Judas allowed the temptations of Satan to enter into his mind while he was angry with Jesus for rebuking him. Satan does have the power to put suggestions of evil into our hearts. This is how he tempts us (e.g., John 13:2). However, he cannot force anyone today to act in a particular way. We choose whether we will succumb to his illicit invitations or stand fast against them (cf. James 4:7). Judas, on this occasion, chose the former.
Judas found an opportunity to go and speak with the Jewish religious leaders, perhaps on that Tuesday night (Roman time) or maybe during the next day. Judas asks the chief priests how much they are willing to pay him if he betrays Jesus to them.
"And they counted out to him thirty pieces of silver" (cf. Zech 11:12). This amount was the price of a slave (cf. Exo. 21:32). Although they counted out the money for him, it does not appear that they gave him the money at that moment (cf. Luke 22:5). It is likely that they paid him the night he fulfilled his promise.
Thirty pieces of silver is really not very much money when one considers that Judas was turning Jesus over to His death (though Judas seemed blind to this fact at the time; cf. Matt. 27:3). Of course, from Judas' perspective, there was little work involved for him and minimal risk. The task would not be difficult or dangerous for him. Evidently this amount of money was agreeable to him. "And when they heard it, they were glad, and promised to give him money" (Mark 14:11). This was a pleasant surprise for them. They probably never imagined that one of Jesus' apostles would voluntarily be untrue to Him!
"So from that time he sought opportunity to betray Him" (Matt. 26:16). Judas would find his opportunity soon enough. He would fulfill his evil contract on Thursday night (Roman time) "in the absence of the multitude" (Luke 22:6).