diff --git a/app/controllers/monzo_transactions_controller.rb b/app/controllers/monzo_transactions_controller.rb index 58f25d8..364f763 100644 --- a/app/controllers/monzo_transactions_controller.rb +++ b/app/controllers/monzo_transactions_controller.rb @@ -91,11 +91,11 @@ def webhook @webhook = params logger.info "Webhook recieved, data: #{@webhook}" - sweepstake = "eurovision-2025" - emojis = ["🎤", "eurovision"] + sweepstake = "world-cup-2026" + emojis = ["⚽️", "football"] begin - if @webhook["type"] == "transaction.created" and emojis.include? @webhook["data"]["notes"].strip.downcase and @webhook["data"]["amount"] == 100 + if @webhook["type"] == "transaction.created" and emojis.include? @webhook["data"]["notes"].strip.downcase and @webhook["data"]["amount"] == 200 logger.info "This is a #{sweepstake} payment" payee = @webhook["data"]["counterparty"]["name"] logger.info "from #{payee}" @@ -142,7 +142,7 @@ def webhook logger.info response.body data = { "fields": { - "pot": { "doubleValue": current_pot + 1 }, + "pot": { "doubleValue": current_pot + 2 }, } } response = RestClient.patch("#{base_url}/sweepstakes/#{sweepstake}?updateMask.fieldPaths=pot", data.to_json, content_type: :json)