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) »
  • PaymexIPN error (Was: CiviEvent no longer records completed reg after 2.2.5 upg)
Pages: [1]

Author Topic: PaymexIPN error (Was: CiviEvent no longer records completed reg after 2.2.5 upg)  (Read 711 times)

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
PaymexIPN error (Was: CiviEvent no longer records completed reg after 2.2.5 upg)
June 12, 2009, 03:23:58 pm
After upgrading to CiviCRM 2.2.5 from 2.2.2, I have found that CiviEvent is no longer recording completed registrations correctly. The registration is passed off to the payment gateway (Paymex in NZ) which successfully completes the transaction and hands the user back to the site. All appears to be well as CiviEvent displays to the user a successful registration message. However, in the database the registration is still recorded as "Pending (Incomplete Transaction)". Regreattably, I only tested as far as the successful registration message on my dev server and didn't realise this bug until it was deployed live. Have attempted a downgrade on the dev server to see if that would be possible but that didn't seem to resolve this issue. Restore from backups not an option due to additional registrations etc that have happened in the interim.

I will set up a test account with a different gateway and see if that results in a different outcome, but because the user is displayed the successful registration message it seems somewhat unlikely that the gateway is at fault. Can anyone suggest any other lines of investigation?
« Last Edit: June 13, 2009, 03:15:16 am by dbabbage »

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: CiviEvent no longer records completed registration after 2.2.5 upgrade
June 12, 2009, 10:01:59 pm

from a brief look at paymex, seems like there is a callback involved that changes the registration from "Pending (Incomplete Transaction)" to either "Completed" or "Cancelled"

Seems like this callback is not hitting your servers. Not sure who wrote the Paymex processor, but i would check the IPN callback and see where it logs information

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

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: CiviEvent no longer records completed registration after 2.2.5 upgrade
June 13, 2009, 03:14:26 am
Thanks for looking at this lobo. You are of course correct it was a problem in the IPN file and it was a coincidence that this problem appeared when I upgraded to 2.2.5. Turns out it was the resurfacing of an issue with the Paymex IPN (which Paymex developed themselves, based heavily on the Paypal one) that xur1z had helped me resolve previously. Apparently I'd only corrected it on the live site and I'd accidentally overwritten the corrected IPN file with the standard one alongside the upgrade to 2.2.5.

I'd already submitted other patches to Paymex but this one got missed. I've now sent Paymex information on how to fix their IPN file but in case anyone needs to do it themselves in the meantime, the file to be changed is:
civicrm/CRM/core/payment/PaymexIPN.php

You need to modify one of the final lines of the file from:
Code: [Select]
$input['amount'] = self::retrieve( 'amount', 'Money', 'POST', false );to read:
Code: [Select]
$input['amount'] = str_replace("$","",self::retrieve( 'amount', 'String', 'POST', false ));

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • PaymexIPN error (Was: CiviEvent no longer records completed reg after 2.2.5 upg)

This forum was archived on 2017-11-26.