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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Errors with CiviCRM-eWay-recurring-payment Extension
Pages: [1]

Author Topic: Errors with CiviCRM-eWay-recurring-payment Extension  (Read 3690 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 05:14:12 am
I enabled the CiviCRM-eWay-recurring-payment-processor extension( https://github.com/henare/CiviCRM-eWay-recurring-payment-processor ) on a Joomla 2.5 CiviCRM 4.3.4 site and ran the PHP file process_recurring_eway_payments.php as per the instructions and I got:

Code: [Select]
Fatal error: Cannot make static method CRM_Core_DAO::getTableName() non static in class CRM_Core_DAO_PaymentProcessor in
/home/xxxx/www/www/administrator/components/com_civicrm/civicrm/CRM/Core/DAO/PaymentProcessor.php on line 422

I tried making it static and I got the same error on CRM_Core_DAO::fields(), so I fixed that also. Then I got:

Code: [Select]
Fatal error: Uncaught SoapFault exception: [Client] SoapClient::SoapClient(): 'location' and 'uri' options are required in nonWSDL mode in
/home/xxxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php:231
Stack trace:
#0 /home/xxxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php(231): SoapClient->SoapClient(NULL)
#1 /home/xxxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php(60): eway_token_client(NULL, NULL, NULL, NULL)
#2 {main}
  thrown in /home/xxxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php on line 231

with PHP 5.3.26. Seems this module is not quite ready for these versions of CiviCRM and PHP.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 06:07:57 am
Hey Hershel,

Thanks for looking at this. I'm just about to upgrade the installation I'm using this on so it's great timing!

Can I ask you to share your fixes? Via a pull request preferably.

Regarding your problem it looks like the script isn't retrieving the payment processor settings from CiviCRM: "eway_token_client(NULL, NULL, NULL, NULL)"

Does the constant 'PAYMENT_PROCESSOR_ID' match the ID of the processor configured in CiviCRM?

Cheers,

Henare

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 06:21:22 am
Quote from: henare on August 12, 2013, 06:07:57 am
Can I ask you to share your fixes? Via a pull request preferably.

No, I just hacked the core file civicrm/CRM/Core/DAO/PaymentProcessor.php in an attempt to get it to run. I didn't fix anything.

Quote from: henare on August 12, 2013, 06:07:57 am
Does the constant 'PAYMENT_PROCESSOR_ID' match the ID of the processor configured in CiviCRM?

Yes, 16 is "eWay_Recurring (org.civicrm.ewayrecurring)" and that is what PAYMENT_PROCESSOR_ID is defined as.

But I didn't define any payment processor instance using that yet. I defined one but nothing changed.

Thank you for your assistance.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 06:34:17 am
Quote from: Hershel on August 12, 2013, 06:21:22 am
But I didn't define any payment processor instance using that yet. I defined one but nothing changed.

You definitely need an instance set up as that's how the script gets your eWay username and things.

To debug it, can you tell me if `$payment_processor` is being set correctly? You can do this by putting these lines after line 54 in the script:

Code: [Select]
var_dump($payment_processor);
die();

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 06:40:13 am
NULL

:(
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 06:47:14 am
Ah. Well at least we know the problem is line 54 - for some reason it's not retrieving the payment processor from CiviCRM.

It could be that you've got the wrong payment processor ID or that the code is not working with your newer CiviCRM.

I'd double-check your payment processor ID (Administer > System Settings > Payment Processors) and processor set up. It should have working settings for all the fields, i.e. username, password, customer ID, site URL and recurring payments URL.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 07:08:07 am
Yes, all the fields are filled. Note that I had to hack a core file so there are definitely some changes that need to be made. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 12, 2013, 07:17:26 am
Thanks for the heads up :) Hopefully I'll look at doing my upgrade in the next week so I'll be forced to fix it then.

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 23, 2013, 08:06:55 am
I've got about halfway through testing (https://github.com/henare/CiviCRM-eWay-recurring-payment-processor/issues/6) and made some code changes (https://github.com/henare/CiviCRM-eWay-recurring-payment-processor/compare/v0.0.5...master) so you might want to try the latest (and unhack core!).

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
August 31, 2013, 02:59:13 am
I've done all the upgrades and it's now running on my installation.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Errors with CiviCRM-eWay-recurring-payment Extension
September 02, 2013, 07:08:29 am
I edited CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php to set

CIVICRM_DIRECTORY

correctly for my site, and then ran it and I got:

Code: [Select]
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.paypal.com/' : Start tag expected, '<' not found
 in /home/xxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php:233
Stack trace:
#0 /home/cando/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php(233): SoapClient->SoapClient('https://www.pay...')
#1 /home/xxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php(57): eway_token_client('https://www.pay...', NULL, 'info_api1.xxx...', 'E2WSMAE68N5DE8C...')
#2 {main}
  thrown in /home/xxx/www/www/media/civicrm/custom_ext/CiviCRM-eWay-recurring-payment-processor-master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php on line 233

Not sure why it's going to PayPal.

On civicrm/admin/paymentProcessor&action=update&id=9&reset=1 I see that my eWay processor is setup with valid data for user/pass etc.

Any ideas?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

henare

  • I’m new here
  • *
  • Posts: 25
  • Karma: 0
    • Twitter
  • CiviCRM version: 4
  • CMS version: Wordpress 3
  • MySQL version: 5
  • PHP version: 5
Re: Errors with CiviCRM-eWay-recurring-payment Extension
September 02, 2013, 08:12:22 am
You also need to set PAYMENT_PROCESSOR_ID: https://github.com/henare/CiviCRM-eWay-recurring-payment-processor/blob/master/org.civicrm.ewayrecurring/process_recurring_eway_payments.php#L32

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Errors with CiviCRM-eWay-recurring-payment Extension
September 02, 2013, 09:35:05 am
That did it. It ran without error. Now we will test with some transactions. Thank you.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Errors with CiviCRM-eWay-recurring-payment Extension

This forum was archived on 2017-11-26.