Answers.Body: <p>You may have found a bug in the webform_civicrm module. I don't have a great way of testing paypal right now, but I've just made <a href="https://github.com/colemanw/webform_civicrm/pull/23" rel="nofollow">a few tweaks</a> which I think will help - can you try it out?</p>
  
  <p>Download the patched version here: <a href="https://github.com/colemanw/webform_civicrm/archive/ipn.zip" rel="nofollow">https://github.com/colemanw/webform_civicrm/archive/ipn.zip</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T19:35:10.620Z
Answers.Text: Do I just extract this folder "webform_civicrm_ipn in my modules folder? What about the existing "webform_civicrm"?
Answers.UserDisplayName: bill dika
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T19:44:41.727Z
Answers.Text: yes delete the webform_civicrm directory and replace it (renaming the new one to match the old name)
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-29T07:29:53.187Z
Answers.Text: Has anyone found a solution to this issue? It's one that I'm having as well. Using all the latest Drupal modules at time of posting:
  
  Core 7.43 Webform 7.x-4.12 CiviCRM Webform 7.x-4.15
Answers.UserDisplayName: Heather O.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-28T20:19:12.953Z
Answers.Text: I tried it with the file you sent me, following your instructions to delete and replace but the same behaviour as under the edit in my original question. Do I just leave this installed? Do you have anything else I can try. Thanks.
Answers.UserDisplayName: bill dika
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-29T22:49:04.293Z
Answers.Text: I have the same issue. Paypal standard does work if selected as the payment processor however using the button gives me the same error as posted above. @Coleman, I tried installing your tweaks but problem still persists. I can give you access to a test site where you run tests. email me yosef@fcberkeley.org
Answers.UserDisplayName: Yossi
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-21T01:55:56.543Z
Answers.LastActivityDate: 2015-10-21T13:53:13.907Z
Answers.LastEditDate: 2015-10-21T13:53:13.907Z
Answers.UserDisplayName: Coleman
Answers.Body: <p>Ok - not ideal [sorry it's not a fix] - but an easy workaround that ensures people use the credit card fields (as opposed to hitting the PayPal button and getting the error message) - would be to hide the PayPal button on the webform_civicrm payment page:</p>
  
  <blockquote>
    <p>$('#billing-payment-block .description').hide();</p>
  </blockquote>
  
  <p>Put this into an editmywebform.js file and then inject this js file using drupal_add_js in your theme's preprocess_page function: e.g.:</p>
  
  <pre><code>function myorg_zen_preprocess_page(&amp;$variables, $hook) {
      if (strpos(request_path(), 'mywebform_url') === 0) {
        drupal_add_js(drupal_get_path('theme', 'myorg_zen') . '/js/editmywebform.js');
      }
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-16T17:33:11.217Z
Answers.LastActivityDate: 2016-05-16T17:33:11.217Z
Answers.UserDisplayName: KarinG - Semper IT
Answers.Body: <p>I had trouble getting Karin's solution to work because the PayPal Express button is loaded after the page is ready.  However, it inspired a solution using CSS:</p>
  
  <pre><code>/**
   * Suppress the PayPal Express button.
   */
  function myorg_preprocess_page(&amp;$variables, $hook) {
    if (strpos(request_path(), 'my-webform-page') === 0) {
      drupal_add_css(drupal_get_path('module', 'myorg') . '/css/hidepaypal.css');
    }
  }
  </code></pre>
  
  <p>The CSS in <code>hidepaypal.css</code> is:</p>
  
  <pre><code>#billing-payment-block .description {
    display: none;
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-31T18:51:54.210Z
Answers.LastActivityDate: 2018-12-31T18:51:54.210Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>For anyone looking to code a fix to this, <a href="https://www.drupal.org/project/webform_civicrm/issues/2938155" rel="nofollow noreferrer">the proposed solution can be found here</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-31T17:14:29.867Z
Answers.LastActivityDate: 2018-12-31T17:14:29.867Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>Using CiviCRM 4.4.4, Webform 7.x-4.11, Webform CiviCRM Integration 7.x-4.12, Paypal Website Payments Pro, Drupal 7.39</p>
  
  <p>When I set up a payment through CiviCRM, credit card payment and Paypal payment work as expected. However, when I set up Payment through Webform CiviCRM integration, the credit card payment works as expected, but clicking on the Paypal button produces an error about email as shown in the attached screenshot. This happens with all my webform civicrm integrations. In other words when I use Webform CiviCRM integration, I have to give up paying with Paypal and since the Paypal button is automatically put on the screen the result is very unprofessional. The email that it shows which is supposed to be an error is my user name in Processor Details for Live Payments dialog.</p>
  
  <p><a href="https://i.sstatic.net/GW9q4.png" rel="noreferrer"><img src="https://i.sstatic.net/GW9q4.png" alt="PayPal Checkout Button error"></a></p>
  
  <p>Any help would be much appreciated, since I find the Webform CiviCRM integration module a great tool.</p>
  
  <p>Paypal support hasn't been much help.</p>
  
  <p>[Edit]
  It turns out that when I am using CiviCRM Webform integration and select the Paypal button the word "express" briefly  appears in the credit card number field on the form. I think this is causing the problem because I don't see it when choosing Paypal from a standard CiviCRM payment page. I have tried different payment buttons from this <a href="https://developer.paypal.com/webapps/developer/docs/classic/archive/buttons/US-UK/" rel="noreferrer">page</a> but the behavior stays the same.</p>
  
  <p>Bill Dika</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-14T16:26:09.057Z
Comments.Text: Not sure if I could be of any help. But it might be that the webform is on a different URL than the CiviCRM Contribution page.
Comments.UserDisplayName: Jaap Jansma - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-16T17:10:55.127Z
Comments.Text: Does googling for that error message from paypal turn up any good suggestions about possible causes?
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-19T20:01:37.747Z
Comments.Text: Thanks for responding Jaap, I don't think that is the problem, since the button works when I am not using CiviCRM Webform integration.
Comments.UserDisplayName: bill dika
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-19T20:20:16.503Z
Comments.Text: @Coleman thanks for responding. Please see the edit above if it helps. I googled - led to the buttons page
Comments.UserDisplayName: bill dika
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-20T21:40:06.527Z
Comments.Text: That's normal - it's the webform_civicrm module's way of tracking that the user has chosen PP express checkout.
Comments.UserDisplayName: Coleman
Tags: <webform-civicrm><paypal>
Title: Webform CiviCRM Paypal Button not Working
ThreadText: # Webform CiviCRM Paypal Button not Working
  
  (Asked by: username_0 on 2015-10-14)
  
  Using CiviCRM 4.4.4, Webform 7.x-4.11, Webform CiviCRM Integration 7.x-4.12, Paypal Website Payments Pro, Drupal 7.39
  
  When I set up a payment through CiviCRM, credit card payment and Paypal payment work as expected. However, when I set up Payment through Webform CiviCRM integration, the credit card payment works as expected, but clicking on the Paypal button produces an error about email as shown in the attached screenshot. This happens with all my webform civicrm integrations. In other words when I use Webform CiviCRM integration, I have to give up paying with Paypal and since the Paypal button is automatically put on the screen the result is very unprofessional. The email that it shows which is supposed to be an error is my user name in Processor Details for Live Payments dialog.
  
  [![PayPal Checkout Button error](https://i.sstatic.net/GW9q4.png)](https://i.sstatic.net/GW9q4.png)
  
  Any help would be much appreciated, since I find the Webform CiviCRM integration module a great tool.
  
  Paypal support hasn't been much help.
  
  [Edit]
  It turns out that when I am using CiviCRM Webform integration and select the Paypal button the word "express" briefly appears in the credit card number field on the form. I think this is causing the problem because I don't see it when choosing Paypal from a standard CiviCRM payment page. I have tried different payment buttons from this [page](https://developer.paypal.com/webapps/developer/docs/classic/archive/buttons/US-UK/) but the behavior stays the same.
  
  username_0
  
  **Tags:** webform-civicrm, paypal
  
  > **Comments:**
  > **username_1**: Not sure if I could be of any help. But it might be that the webform is on a different URL than the CiviCRM Contribution page.  
  > **username_2**: Does googling for that error message from paypal turn up any good suggestions about possible causes?  
  > **username_0**: Thanks for responding username_1, I don't think that is the problem, since the button works when I am not using CiviCRM Webform integration.  
  > **username_0**: @username_2 thanks for responding. Please see the edit above if it helps. I googled - led to the buttons page  
  > **username_2**: That's normal - it's the webform_civicrm module's way of tracking that the user has chosen PP express checkout.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2015-10-21. Score: 3
  
  You may have found a bug in the webform\_civicrm module. I don't have a great way of testing paypal right now, but I've just made [a few tweaks](https://github.com/colemanw/webform_civicrm/pull/23) which I think will help - can you try it out?
  
  Download the patched version here: <https://github.com/colemanw/webform_civicrm/archive/ipn.zip>
  
  > **Comments:**
  > **username_0**: Do I just extract this folder "webform_civicrm_ipn in my modules folder? What about the existing "webform_civicrm"?  
  > **username_2**: yes delete the webform_civicrm directory and replace it (renaming the new one to match the old name)  
  > **username_0**: I tried it with the file you sent me, following your instructions to delete and replace but the same behaviour as under the edit in my original question. Do I just leave this installed? Do you have anything else I can try. Thanks.  
  > **username_4**: I have the same issue. Paypal standard does work if selected as the payment processor however using the button gives me the same error as posted above. @username_2, I tried installing your tweaks but problem still persists. I can give you access to a test site where you run tests. email me yosef@fcberkeley.org  
  > **username_3**: Has anyone found a solution to this issue? It's one that I'm having as well. Using all the latest Drupal modules at time of posting:  Core 7.43 Webform 7.x-4.12 CiviCRM Webform 7.x-4.15  
  
  ---
  
  ### Answer by username_5 on 2016-05-16. Score: 2
  
  Ok - not ideal [sorry it's not a fix] - but an easy workaround that ensures people use the credit card fields (as opposed to hitting the PayPal button and getting the error message) - would be to hide the PayPal button on the webform\_civicrm payment page:
  
  > $('#billing-payment-block .description').hide();
  
  Put this into an editmywebform.js file and then inject this js file using drupal\_add\_js in your theme's preprocess\_page function: e.g.:
  
  ```
  function myorg_zen_preprocess_page(&$variables, $hook) {
      if (strpos(request_path(), 'mywebform_url') === 0) {
        drupal_add_js(drupal_get_path('theme', 'myorg_zen') . '/js/editmywebform.js');
      }
  }
  
  ```
  
  
  ---
  
  ### Answer by username_6 on 2018-12-31. Score: 1
  
  I had trouble getting Karin's solution to work because the PayPal Express button is loaded after the page is ready. However, it inspired a solution using CSS:
  
  ```
  /**
   * Suppress the PayPal Express button.
   */
  function myorg_preprocess_page(&$variables, $hook) {
    if (strpos(request_path(), 'my-webform-page') === 0) {
      drupal_add_css(drupal_get_path('module', 'myorg') . '/css/hidepaypal.css');
    }
  }
  
  ```
  
  The CSS in `hidepaypal.css` is:
  
  ```
  #billing-payment-block .description {
    display: none;
  }
  
  ```
  
  
  ---
  
  ### Answer by username_6 on 2018-12-31. Score: 0
  
  For anyone looking to code a fix to this, [the proposed solution can be found here](https://www.drupal.org/project/webform_civicrm/issues/2938155).
  
  
  ---
  
  