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) »
  • Civi Info going to PayPal
Pages: [1]

Author Topic: Civi Info going to PayPal  (Read 1170 times)

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Civi Info going to PayPal
February 23, 2012, 04:25:29 pm
Does CiviCRM determine what is sent to PayPal? Currently when we pull a paypal report from our contributions it does not send over the shipping address information and we really need this when we enter in transaction via paypal to our quickbooks. Any help would be much appreciated on this! Thank you!

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Civi Info going to PayPal
February 23, 2012, 05:22:06 pm
This is what is says in Pay Pal do you know where in CiviCRM I can make this change?

PayPal allows you to post extended variables if you change this "cmd" input:
<input type="hidden" name="cmd" value="_xclick">
TO
<input type="hidden" name="cmd" value="_ext-enter">
<input type="hidden" name="redirect_cmd" value="_xclick">

Then you can add these variables
Extended Variables
Name   Value
email   Customer's email address
first_name   Customer's first name. Must be alpha-numeric, with a 32 character limit
last_name   Customer's last name. Must be alpha-numeric, with a 64 character limit
address1   First line of customer's address. Must be alpha-numeric, with a 100 character limit
address2   Second line of customer's address. Must be alpha-numeric, with a 100 character limit
city   City of customer's address. Must be alpha-numeric, with a 100 character limit
state   State of customer's address. Must be official 2 letter abbreviation
zip   Zip code of customer's address

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: Civi Info going to PayPal
February 23, 2012, 05:33:15 pm

Might want to check and use:

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

to add the name/address to the info we send to paypal. Note that we use "NVP" to send info 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

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Civi Info going to PayPal
February 23, 2012, 07:06:00 pm
Hmm I have never done a hook before. Since we use paypal Pro do I just have to update this part of the function? Where and how would I pass the address information? Is there any more documentation out there for doing hooks that you  know of?

else if( $paymentObj instanceof CRM_Core_Payment_PayPalImpl && $processorType == 'PayPal' ) {
        // Website Pro  Checkout
        $obj   = $paymentObj->getVar('_paymentForm');
        $value = $obj->getVar('_values');
        $id    = $value['id'];
        if ( $value['event']['id'] ) {
            $id =  $value['event']['id'];
        }
 
        $cookedParams['desc'] = $rawParams['description'];
        $cookedParams['custom'] = $id;

ryeradio

  • I post frequently
  • ***
  • Posts: 185
  • Karma: 1
  • CiviCRM version: 4.2.1
  • CMS version: Drupal
  • MySQL version: MySQL5
  • PHP version: PHP5
Re: Civi Info going to PayPal
February 23, 2012, 07:35:16 pm
Or do we just call this function and add the parameters here?
hook_civicrm_alterPaymentProcessorParams( $paymentObj,&$rawParams, &$cookedParams );

If so what parameters do I need to pass?

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: Civi Info going to PayPal
February 23, 2012, 07:50:44 pm

please read:

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

There is also lots of docs on the drupal website explaining hooks

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Civi Info going to PayPal

This forum was archived on 2017-11-26.