Erroneous PayPal "You'll be able to review your order" message

We are using S2Member Pro, using the PayPal Pro Form but with a standard PayPal account.

When we submit our form, the resulting PayPal page contains a blue submit button that says “Continue”, with small type below that says “You’ll be able to review your order before you complete your purchase.” However when clicking on Continue the payment processes and we’re immediately returned to the site.

Here is a post containing some links to other posts that discuss this, and suggest adding a value when generating the PayPal button.

Unfortunately we aren’t given direct access to the code that generates the PP button, so can’t add this code anywhere (without hacking the method(s) that generate the PayPal button). Is there a suggested approach for addressing this? Is this a known issue, and do people think it’s related to using a PP pro form with a PP standard account?

It looks like there is nothing PayPal can change to change this, nor is there any apparent setting in S2Member to set “commit: true” when calling paypal.Button.Render().

With PayPal Pro Forms it doens’t look like we are rendering a “PayPal button” per se. The form on the page submits to itself, and there must be a handler that takes the submitted data and turns it into what PayPal wants to see.

Can someone point us to this handler (in the S2Member/Pro code), so we can see if there is a way to inject commit: true into the data it sends to PayPal?

And - can anyone who uses PayPal Pro Forms with a PayPal Pro account confirm that either a) the blue button at PayPal doesn’t say “Continue” or b) it does, but clicking it actually continues and doesn’t complete the transaction?

Thanks!

Never mind - found it:

/src/includes/classes/gateways/paypal/paypal-checkout-in.inc.php, line 202.

Adding &useraction=commit to the query string forces PayPal to show the “Pay” button rather than the “Continue” button.

Now to figure out a way to do this external to the plugin, so we don’t have to redo the hack with every update…