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 CiviContribute (Moderator: Donald Lobo) »
  • Pass custom data to Paypal IPN
Pages: [1]

Author Topic: Pass custom data to Paypal IPN  (Read 4587 times)

lardissone

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Pass custom data to Paypal IPN
November 13, 2007, 03:21:30 pm
Hi,

I want to know if there's a way to send custom data to Paypal to get after with Paypal IPN. I need for example send a var like DON01, that will indicate our custom software that this is a donation from campaign number 1.

Or maybe it's still sending an id or something?

Thanks.
Leandro

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: Pass custom data to Paypal IPN
November 13, 2007, 03:30:52 pm

There is no way to send in values programmatically. You can hack the code to do the needful. The relevant file is here:

http://fisheye.civicrm.org/browse/CiviCRM/branches/v1.9/CRM/Core/Payment/PayPalImpl.php?r=11314

line 521

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

lardissone

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Pass custom data to Paypal IPN
November 14, 2007, 08:54:21 am
Great.

Two more things:
1.- how can I know which donation is in that file? ($params['contributionID'] ?)
2.- Can I add more params and these are sent to Paypal IPN ? Paypal IPN take all the new params?

Thank you,
Leandro

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: Pass custom data to Paypal IPN
November 14, 2007, 09:48:30 am

1. yes

2. we send all the name/value pairs in the paypalParams array to paypalIPN. Note that we do not do store any name/value pairs that you might introduce in the civicrm database

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

lardissone

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Pass custom data to Paypal IPN
November 14, 2007, 10:14:45 am
Is that something new in 1.8+ ?

I've 1.7.9379 installed and didn't found that.
I know I should upgrade, but I need to do this quick fix and then after some donation campaigns finish I'll upgrade CiviCRM, but for now, is that possible in my version?

Thanks,
Leandro

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: Pass custom data to Paypal IPN
November 14, 2007, 10:44:49 am

this is a hack for all civicrm versions. you will have to understand and modify the code

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

lardissone

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Pass custom data to Paypal IPN
November 14, 2007, 12:16:00 pm
Excellent, thank you.

Just for reference, in 1.7 or previous these variables are in:
http://fisheye.civicrm.org/browse/CiviCRM/branches/v1.7/CRM/Contribute/Payment/PayPalImpl.php?r=trunk#l95

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Pass custom data to Paypal IPN

This forum was archived on 2017-11-26.