I just set this up over the weekend and found that the PayPal button ID isn't being passed to the URL when redirecting to the PayPal site. I've made sure I have permission to make a payment, etc. To get around this in the short-term, I've hard-coded my ID into the module, which works fine.
Also, I have a feature request - would it be possible to pass an amount to the PayPal form from a field on the Webform?
Thanks!
-=Delty
Comments
Comment #1
mrf commentedI am not currently seeing this issue myself. Could you please post the url that is being generated for the button and the correct url? This might provide a clue to what portion is failing.
Comment #2
delty commentedThis is the URL in its non-working format with nothing appearing after the hosted_button_id element.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id&custom=http%3A//www.mysite.com/node/6/submission/13Apparently it's just not getting the PayPal ID from the form field.
Comment #3
jhofer commentedI'm having trouble with this as well. When clicking on the "Pay Now" button I'm directed to https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id&cus...
Delty - how/where did you hard code the ID into the module? (I'm okay with applying patches, just not figuring out how to do things from scratch!)
I'm wondering if I missed a configuration somewhere other than the ID? Do we need to input our paypal email address anywhere?
Comment #4
mrf commentedOk, figured this one out, I've been looking up the label of the component to find the value and apparently this label can have special characters stripped and won't return a value.
For now try using a plain text label for your button (it won't ever be displayed) or you can hard code the value by changing the following line:
And replace the second half with your fixed value for the hosted button id.
After looking at this code its a really awkward to find a custom label value, so I'm going to figure out a way to just set the label to a fixed unchangeable value to avoid this problem. I'll update this thread when a new dev release with this fix is out.
Comment #5
mrf commentedWell I just missed the drupalcon keynote, but now there is a fix in the latest dev. :)
If one of you guys can confirm this is working for you I'll probably roll out a new rc with the fix since this has the potential to be a problem for a good number of people.
Comment #6
jhofer commentedThe Dev version does solve the issue! That's Good...
There is still the issue of how do we pass a field to Paypal (such as a dollar amount webform field)? Should I start another issue?
Comment #7
mrf commentedThanks for testing this.
Definitely feel free to file any feature requests separately.
I'm aiming to get to a stable 1.0 with the features that are there now and then move on to some of the other features.