You’re supposed to pass the function itself, instead of calling it:
MarketPlace.ProcessReceipt = processReceipt