CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error with PayPal payment
Pages: [1] 2 3

Author Topic: Error with PayPal payment  (Read 7725 times)

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Error with PayPal payment
September 07, 2012, 03:16:06 pm
I'm testing PayPal Express with CiviCRM without much luck so far. I'd appreciate any clues as to what I am doing wrong.
CiviCRM 4.2 and Drupal 7.15

However, when I test drive I get the following error message:
Warning: Invalid argument supplied for foreach() in CRM_Event_Form_Registration_Register::formRule() (line 887 of /home/zerocarb/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php).

If I attempt to register for the event I get the following error message when I click on the Register button

Sorry but we are not able to provide this at the moment.
Could not find user name for payment processor

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error with PayPal payment
September 07, 2012, 04:37:48 pm

can you try and reproduce this on the demo server

a few folks have mentioned the below and we would like to track and fix this issue before the next 4.2.x release

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Error with PayPal payment
September 07, 2012, 08:36:37 pm
I'm not familiar with the demo server. Can you point me in the right direction.

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Error with PayPal payment
September 08, 2012, 07:59:12 am
I figured out where the demo server was and can replicate the error there when I test drive the registration.

Warning: Invalid argument supplied for foreach() in CRM_Event_Form_Registration_Register::formRule() (line 887 of /var/www/drupal7.civicrm.org/svn/civicrm42/CRM/Event/Form/Registration/Register.php).

MaffooClock

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.2.2
  • CMS version: Drupal 7.18
  • MySQL version: 5.5.28
  • PHP version: 5.3.20
Re: Error with PayPal payment
September 11, 2012, 10:10:20 am
I'm encountering the same issue, except it's not specific to PayPal.  When a user performs event registration online and chooses the "Pay Later" option, then clicks the Continue button, the same error cited by Patricia43 is displayed on the Registration Confirmation page.  Screenshot attached.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error with PayPal payment
September 11, 2012, 10:34:38 am

patricia:

can you give us the steps along with urls to reproduce this on the demo server

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jday

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 6
  • CiviCRM version: 4.2
  • CMS version: 7.15
Re: Error with PayPal payment
September 20, 2012, 07:14:37 am
I'm getting these errors with paypal AND pay later options (I am using a price set):
https://twincitiesoperaguild.org/civicrm/event/register?id=1&reset=1

    Notice: Undefined property: CRM_Event_Form_Registration_Register::$_paymentFields in CRM_Event_Form_Registration_Register::formRule() (line 887 of /var/www/tcog/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php).
    Warning: Invalid argument supplied for foreach() in CRM_Event_Form_Registration_Register::formRule() (line 887 of /var/www/tcog/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php).


On the demo site:
http://drupal.demo.civicrm.org/civicrm/event/register?_qf_Register_display=true&qfKey=200ecf07f2764720943b8f416ad58f93_2329

Steps to reproduce
1. create an event
2. add payment processor
3. add event fees
4. enable online registration
5. sign up for the event
6. error shows on review page

Warning: Invalid argument supplied for foreach() in CRM_Event_Form_Registration_Register::formRule() (line 896 of /var/www/drupal7.civicrm.org/svn/civicrm42/CRM/Event/Form/Registration/Register.php).

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Error with PayPal payment
September 20, 2012, 10:10:55 am
hi Donald,

I apologize for not getting back to you. I was busy on another site. Now this problem has risen to the top of the pile because we would like to start using PayPal asap.

However, in my case, I am using a test payment and don't have any userid, password or signature specified

Patricia

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Error with PayPal payment
September 21, 2012, 01:33:14 am
Patricia,

These notices and warnings have already been fixed in svn - https://fisheye2.atlassian.com/changelog/CiviCRM?cs=42374.

We tried to reproduce to look for any other errors / warnings but couldn't reproduce.

thanks
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

DicE

  • I post occasionally
  • **
  • Posts: 33
  • Karma: 0
  • CiviCRM version: 4.5.1
  • CMS version: Drupal 7.latest
  • MySQL version: 5.5.25a
  • PHP version: 5.3.15
Re: Error with PayPal payment
September 21, 2012, 08:45:31 am
I have the exact same problem on event registration using only the 'pay later' option.
I can confirm using price sets also.

on the other hand, it does not happen all the time either :(
I have not been able to detect a patern either.

I run drupal 7.15 with civi 4.2. Will be applying 4.2.1 later. Not sure if this is fixed in that release.

DicE

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Error with PayPal payment
September 21, 2012, 09:47:20 am
Fixes will be part of v4.2.2.

Or you could also try the patch pointed in my previous post.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

jday

  • I post occasionally
  • **
  • Posts: 62
  • Karma: 6
  • CiviCRM version: 4.2
  • CMS version: 7.15
Re: Error with PayPal payment
September 21, 2012, 07:40:23 pm
I don't know how to apply a patch for CiviCRM but I replaced the Register.php file with the one linked in #8 and now the errors are gone. Thanks for sharing that.

Patricia43

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Error with PayPal payment
September 22, 2012, 01:26:37 pm
I got rid of the error by applying the patch for #8 but when I go to the test drive page there is no button to complete the registration process. What might cause this?

Strangely there is the text "blah blah" on the line above the How many drop down. Is this a clue?

crispin

  • I’m new here
  • *
  • Posts: 8
  • Karma: 0
    • Crispin Read dot co dot UK
  • CiviCRM version: various
  • CMS version: Drupal
  • MySQL version: various
  • PHP version: various
Re: Error with PayPal payment
September 25, 2012, 08:07:08 am
I am in the same boat here but from a different thread - I have linke here from there now...

I replaced register.php with the file in #8 - no more error (line 887) for payment by cheque or for cardsave

however I get this new error when trying to pay using cardsave

warning: Invalid argument supplied for foreach() in
~~~~/sites/all/modules/civicrm/CRM/Event/Form/Registration/Register.php on line 268.

268 in BOLD here

    if ($this->_priceSetId) {
      foreach ($this->_feeBlock as $key => $val) {
        foreach ($val['options'] as $keys => $values) {
          if ($values['is_default'] &&
            !CRM_Utils_Array::value('is_full', $values)
          ) {

            if ($val['html_type'] == 'CheckBox') {
              $this->_defaults["price_{$key}"][$keys] = 1;
            }
            else {
              $this->_defaults["price_{$key}"] = $keys;
            }
          }
        }
      }
Say hello on Twitter: @crispin_read

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Error with PayPal payment
September 26, 2012, 02:27:01 am
Hey crispin,

This is probably fixed in svn as we unable to reproduce.

Here is how you can help to make sure the problem is knocked off :

- Do a svn install just for testing purpose & see if you still able to reproduce the warning.

OR

- Debug a bit further. Check the value of $this->_feeBlock & see what / why thats happening & report back.

OR

- send us your DB dump & we can check if we able to reproduce the problem you mentioned (you can remove / encrypt important details.)

thanks
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

Pages: [1] 2 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error with PayPal payment

This forum was archived on 2017-11-26.