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) »
  • Utils::formatAPIParams() uses risk-information-notification for Google Checkout
Pages: [1]

Author Topic: Utils::formatAPIParams() uses risk-information-notification for Google Checkout  (Read 1203 times)

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Utils::formatAPIParams() uses risk-information-notification for Google Checkout
March 26, 2010, 01:08:03 pm
I just discovered that when bin/ContributionProcessor.php pulls contributions/purchases from Google Checkout that the resulting contact in the database has no first name.  I took a look at what Google was returning and sure enough there was only contact-name.  This astounded me, but search revealed this:

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Structured_Names.html

I turned on that feature and Google now returns a structured name.  The structured name is only returned under the new-order-notification section, but it would appear that formatAPIParams() is pulling name/address information from the risk-information-notification section, where the structured name doesn't exist.  I'm wondering if there is a reason for this, or if it was somewhat arbitrary.  If it was arbitrary, then I'd like to submit a patch that makes it grab all name/address info from the new-order-notification section and add a conditional that checks for the existence of an array element titled [structured-name] and to use it if present.

Any feedback?

Thanks,

Nathan

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Re: Utils::formatAPIParams() uses risk-information-notification for Google Checkout
March 29, 2010, 12:45:13 pm
The patches are attached.  It seems to work fine.  With the attached patches ContributionProcessor.php will now populate first_name and last_name for Google Checkout contributions.

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Utils::formatAPIParams() uses risk-information-notification for Google Checkout
March 30, 2010, 12:53:38 pm
Nathan,

The Google checkout code is quite old hasn't been updated.

Could you file an issue and attach your patch.

thanks,
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Re: Utils::formatAPIParams() uses risk-information-notification for Google Checkout
March 30, 2010, 01:17:04 pm
http://issues.civicrm.org/jira/browse/CRM-6039

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Utils::formatAPIParams() uses risk-information-notification for Google Checkout

This forum was archived on 2017-11-26.