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

mrf’s picture

I 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.

delty’s picture

This 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/13

Apparently it's just not getting the PayPal ID from the form field.

jhofer’s picture

I'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?

mrf’s picture

Assigned: Unassigned » mrf
Priority: Normal » Major

Ok, 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:

  $post_data['hosted_button_id'] = $form_state['values']['submitted_tree'][$paypal_component_name]; 

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.

mrf’s picture

Status: Active » Needs review

Well 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.

jhofer’s picture

The 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?

mrf’s picture

Status: Needs review » Fixed

Thanks 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.