I'm trying to set up a contribution webform with paypal. I've created a payment processor using paypal express, with sandbox details, and assigned it to a contribution page. I can make a test contribution through the contribution page and it works well. I created a webform using webform_civicrm referencing that contribution page and then tried making a test donation that way. The paypal button does not appear, and if I click "submit query" (which appears instead of the paypal button), it sends a GET request to this url:
resulting in BAD_INPUT_ERROR.
I think the non-appearance of the paypal button is a red herring; the url_button parameter is not passed but if I hack the button url into the code, it does appear, but the same thing happens when I click it.
The reason I need to use a webform rather than a contribution page is that I need an activity of a custom type to be created when the contribution is made, with custom fields that the user will fill in when they make the contribution.
EDIT IN RESPONSE TO COMMENT:
There are no console errors Nothing in watchdog or Civi logs except in regard to the missing 'url_button' index. The webform is set up very simply, I just set the contribution page and payment processor. Not sure what else to say in that regard.
To be clear: "BAD_INPUT_ERROR" is a Paypal error code, it comes from them. I've looked for API docs to see what might be wrong with the above GET request but have not found any relevant docs. When I make the donation using the contribution page, it does not make the same GET request, but a different one, using a token, which succeeds.