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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Payment Express in 4.2 Upgrade
Pages: [1]

Author Topic: Payment Express in 4.2 Upgrade  (Read 675 times)

Matt Renner

  • I’m new here
  • *
  • Posts: 2
  • Karma: 2
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5
Payment Express in 4.2 Upgrade
August 31, 2012, 11:49:26 pm
Hi all,

I undertook the upgrade from 4.1 to 4.2 this weekend, and everything seemed to work smoothly until I went to process a test transaction, and I started getting PHP fatal errors from the CiviCRM Payment Express payment module.

The particular error was
[01-Sep-2012 17:43:48] PHP Fatal error:  Call to undefined function _valueXml() in PaymentExpress.php on line 204

I thought, hmm, strange, considering this function had not disappeared - It remains in PaymentExpressUtils.php (in the same folder)
I noticed there was no class declaration in PaymentExpressUtils, so I decided I would wrap the functions in this file with class CRM_Core_Payment_PaymentExpressUtils - and then use this to reference _valueXml() etc from the other functions that need it.

This fixed the problem - woohoo! However, given there hasn't been any noise about this yet.. Is this issue I've resolved just particular to my set up or is the Payment Express module actually hosed? Obviously I don't want to be making changes to core files if it is simply a problem with the environment!

Your advice gladly received  :)

jords

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
Re: Payment Express in 4.2 Upgrade
September 02, 2012, 01:26:42 am
You are not alone - I have the exact same problem. Can you post a patch for your fix?

Cheers
Jordan

jords

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
Re: Payment Express in 4.2 Upgrade
September 02, 2012, 01:52:36 am
I placed the line

require_once("PaymentExpressUtils.php");

at the top of PaymentExpress.php and PaymentExpressIPN.php, seemed to also fix the problem

Matt Renner

  • I’m new here
  • *
  • Posts: 2
  • Karma: 2
  • CiviCRM version: 4.2
  • CMS version: Drupal 7.15
  • MySQL version: 5.1.63
  • PHP version: 5
Re: Payment Express in 4.2 Upgrade
September 02, 2012, 02:19:23 am
Yeah that will do effectively the same thing as my solution (although it means you load the Utils file more times than necessary)

Please see the attachments for how I fixed it. (apologies for the text files - can't directly upload php files!)

Cheers


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: Payment Express in 4.2 Upgrade
September 02, 2012, 10:08:31 am

hey matt:

thx for investigating and the fix.

Can you please create an issue and attach your patches to the issue at http://issues.civicrm.org/

if you do this early next week, we should be able to get this into 4.2.1

thx

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Payment Express in 4.2 Upgrade
September 02, 2012, 07:12:04 pm
I have committed this - it will be in 4.2.1.

Problem was the code relied on some require_onces that had been taken out as part of the autoloader fix. However, Matt provided a nice refactor patch. (karma +)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Payment Express in 4.2 Upgrade

This forum was archived on 2017-11-26.