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) »
  • Customizing PayPal receipt
Pages: [1]

Author Topic: Customizing PayPal receipt  (Read 5370 times)

hotsauce

  • Guest
Customizing PayPal receipt
August 30, 2010, 12:09:53 pm
Hi all,

Fairly new to Civi but I love what I have been able to do with it for clients so far.

I know this is the CiviContribute board but since this is a PayPal question I thought I would ask it here, feel free to let me know if its better served in CiviEvent

I am customizing a site wherein the client has online Event registration and the payment is processed through PayPal standard. I need to accomplish two things with the receipt email/transaction Details that is being sent to PayPal.

1. I need to set the InvoiceID to something that isn't an md5 random number (for instance, start at 100 and add one each transaction, if possible) so that they can keep track more easily with their internal system.

2. When a user pays for an event, they enter the registrants name as well as the billing contacts name. Right now, the name that shows up in Civi by default is the person who is actually completing the registration, I need to be able to put this and the billing contact name (billing contact is a custom field) in the receipt that shows up for the user registering as well as my client when they login to their PayPal account.

Essentially, I need to know how to send more information to PayPal to get displayed in transaction details that what Civi is already sending. I've been through PayPallmpl.php and Payment.php (in CRM/Core) but can't seem to find any way to easily send more information.

Any help would be appreciated, please let me know if something isn't clear. These forums are great for a Civi newbie, and I look forward to any help!

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: Customizing PayPal receipt
August 30, 2010, 12:57:44 pm

1. u'll need to hack the code to do so. I'd probably recommend using the "id" of the contribution instead since it matches your rule (i.e. auto-increment and unique) rather than hacking the code to make invoice id behave like id. alternatively you might want to use a custom field for "internal invoice id"

2. check the hook:

http://wiki.civicrm.org/confluence/display/CRMDOC32/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmalterPaymentProcessorParams

you should be able to add additional name/value params there which are then sent to paypal

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: Customizing PayPal receipt
August 30, 2010, 02:07:08 pm
Alternatively you can turn off the paypal receipt & customise the CiviCRM receipt.

Note that for invoice ID I generally use the contribution id - you can add it in smarty templates - the format is either {contributionID} or {$contributionID} I think
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

hotsauce

  • Guest
Re: Customizing PayPal receipt
August 31, 2010, 05:43:29 am
Donald - Thank you for pointing me in the right direction with this, I will get into the extra variables and try to get it working that way!

Eileen - If I turn off the PayPal receipt and use the CiviCRM receipt, will that have any impact on the way things show up on the actual PayPal site? I would imagine that it wouldn't so that probably isn't the most viable option, but I may look into it if I run into issues with PayPal.

Thank you both for the quick response! It's great to have a useful and knowledgeable community for us newbies  :)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Customizing PayPal receipt
September 01, 2010, 12:26:59 am
No - it shouldn't affect anything except the receipt if you turn it off
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 »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Customizing PayPal receipt

This forum was archived on 2017-11-26.