Has anyone gotten Paypal or any payment gateway to work with Webforms module?

Comments

sampeckham’s picture

No, but I'll certainly be trying. I'm hoping the 'additional processing' field will help with Paypal integration. Although, I'm trying to use the Pro system, to keep everything within my site. Trying out integrating a webform with Constant contact first though.

Be great to hear anyone else trying or who has succeeded with either of these!?

sampeckham’s picture

Integration with Constant Contact API works fine, using the additional processing code area!

Next step Paypal!

wmcfetridge’s picture

I'd love to see any kind of hint as to how to use the Additional Processing Field to submit data to any payment system. Not sure what I will use just yet. Also keen to perhaps build a "credit card" component for Web Form Module to make it easier for admins to set up a form that require payment

sampeckham’s picture

Not quite there yet, but will post back here if/when I get it working. I'm waiting to get the PayPal Pro account cleared and running. i think there may be some guidance on using the 'additional processing area' on the webform documentation page though.

yurg’s picture

Hello.

I've made an initial attempt to resolve this issue, and described it here: http://drupal.org/node/29434.
Unfortunately, I have only half of solution, 'cause i'm not-so-smart to make, for example, this http://drupal.org/node/285882 receipt works in my case. So, if somebody knows the way to print out submitted Webform variables for additional processing, we would be able to solve this.

jackread’s picture

I'm about to start trying to get this to work with paypal website payments pro....

if you have any tips or code that might help I'd appreciate it!

eftho’s picture

Has anyone been able to use PayPal with webforms yet? If so, could they please explain how?

scooper’s picture

What I'm doing is a 2 step process, not great but it works: 1) A membership application is completed with a webform; I save fields I want passed to PayPal in the Additional Processing section with session variables (this is Drupal 6):

<?php
$_SESSION['mffn'] = $form_values['submitted_tree']['first_name'];
$_SESSION['mfln'] = $form_values['submitted_tree']['last_name'];
$_SESSION['mfadr'] = $form_values['submitted_tree']['address1'];
...
$_SESSION['mfamt'] = $form_values['submitted_tree']['amount'];
?>

For "redirect URL" I have another node with title "Membership Payment". Example: internal:node/56

2) On the Membership Payment page I have text such as "complete your application with your credit card payment..."
This page has the PayPal form, and I pick up the session variables to pass to PayPal, for example:

<?php
$fn = $_SESSION['mffn'];
$ln = $_SESSION['mfln'];
$ad = $_SESSION['mfadr'];
$city = $_SESSION['mfcity'];
$state = $_SESSION['mfstate'];
$zip = $_SESSION['mfzip'];
$amount = $_SESSION['mfamt'];
?>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
...
<input type="hidden" name="first_name" value="<?php echo "$fn"; ?>" />
<input type="hidden" name="last_name" value="<?php echo "$ln"; ?>" />
<input type="hidden" name="address1" value="<?php echo "$ad"; ?>" />
<input type="hidden" name="city" value="<?php echo "$city"; ?>" />
<input type="hidden" name="state" value="<?php echo "$state"; ?>" />
<input type="hidden" name="zip" value="<?php echo "$zip"; ?>" />
<input name="Submit" type="submit" value="Complete Application" />
</form>

It would be nice to have it all on one page, maybe someone can share how to do that.

irishjays’s picture

Hi,
I'm smart enough to know this looks workable. However I'm stuck, is submitted_tree a variable? Will that take into account field sets? I labeled all my fields to match "first_name" etc. But it's not writing anything on the redirect node internal/node yadayada. I think it must be either not saving session data at all, or my $form Values aren't pointing to the right place. Here's my HTML output for the webform item:

<div class="webform-component-textfield" id="webform-component-first_name"><div class="form-item" id="edit-submitted-first-name-wrapper">
 <label for="edit-submitted-first-name">First Name: <span class="form-required" title="This field is required.">*</span></label>

 <input type="text" maxlength="128" name="submitted[first_name]" id="edit-submitted-first-name" size="60" value="" class="form-text required" />

Would that be:

$_SESSION['mffn'] = $form_values['submitted_tree']['first_name']; not working

$_SESSION['mffn'] = $form_values['submitted_tree']['edit-submitted-first-name']; not working
$_SESSION['mffn'] = $form_values['submitted']['first_name']; not working

My head hurts, but I know someone can help me!
Thanks so much!

EDIT: I was able to get it working. I simply created a new webform, and it worked fine. I think it may have been because I had enabled PHP filter after I made the 1st webform. At least I learned a lot as I have to figure it out on my own.
http://drupal.org/node/764934#comment-2819814
J

Yuki’s picture

Subscribe

awasson’s picture

Subscribe

badzilla’s picture

I've integrated Webform + Paypal Donations buttons on Drupal 6 http://www.badzilla.co.uk/Drupal-6-Webform-Paypal-Donations-Integration-...

nate covington’s picture

I just posted a similar solution that works with Drupal 7, Webform 4.

<a href="https://www.covingtoncreations.com/blog/simple-drupal-webform-v4-paypal-...">Simple Drupal Webform (v4) PayPal Integration using custom PHP confirmation message</a>