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) »
  • PayPal Recurring -- Profile Initiated on Paypal
Pages: [1]

Author Topic: PayPal Recurring -- Profile Initiated on Paypal  (Read 2147 times)

podfish

  • I’m new here
  • *
  • Posts: 11
  • Karma: 1
PayPal Recurring -- Profile Initiated on Paypal
December 18, 2010, 01:01:19 pm
Recurring payments initiated from CiviContribute are working fine (see versions in my profile info to the left.)  IPNs for these payments are fine.  Normal behavior, all is great.

However, we have some folks we're trying to migrate from our old processor to PayPal, but we don't want to screw around with their contribution schedule.

So, the thought was that we would just schedule them on PayPal profiles (we're paying for recurring and website payments pro) and they would come through and future contributions (and initial recurring payment records)

However, the IPNs for these payments are not working, they're bouncing off the notification url with the "Dec 17 17:39:28  [info] Could not get module name from request url" message.
ey
I'm wondering what we're doing wrong on the manually created profiles that they're rejecting?  Any thoughts?

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: PayPal Recurring -- Profile Initiated on Paypal
December 18, 2010, 05:42:39 pm

a few questions:

1. can u elaborate a bit on how you are scheduling them via PP Profiles

2. Can u cut-n-paste the notification url

thanx

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

podfish

  • I’m new here
  • *
  • Posts: 11
  • Karma: 1
Re: PayPal Recurring -- Profile Initiated on Paypal
December 20, 2010, 09:20:36 am
Hey, Lobo:

I've done a little bit more work trying to nail this down.  Here's the notification URL:    https://support.coffeestrong.org/sites/all/modules/civicrm/extern/ipn.php

I'm logging on to PayPal itself and setting up a recurring profile.  Here are the details for a correct, working profile that was initiated from CiviCRM.

Quote
Recurring Payments: Profile Details via - Website Payments Pro
Profile information
Profile ID   I-NKLGBX4AMRMG
Product/service   Online Contribution: Support Coffee Strong: 100.00 Per 1 month
Merchant reference ID   i=b08e43ec8d8b60d71563290575bb5760&m=contribute&c=504&r=7&b=200&p=1
Start date   Dec 12, 2010
End date   Nov 12, 2011
Profile Status   Active
 ||Modify|
Buyer information
Name: {omitted}
Email   {omitted}
Billing terms
Next payment date   Jan 12, 2011
Failed payments maximum (What's this?This recurring payment profile will be automatically suspended after this number of failed payments.)   No limit
Add missed payments to next billing?   No
Payment activity
Payment type   Initial Payment
Amount due   $0.00 USD
Amount received   $0.00 USD
Payment type   
Payment cycle   
Total cycles   
Cycles remaining   
Amount due per cycle    Details
Amount received   
Payment type   Regular Recurring Payment
Payment cycle   Monthly
Total cycles   12
Cycles remaining   11
Amount due per cycle   $100.00 USD Details
Amount received   $100.00 USD
Payment summary
Total received   $100.00 USD Details
Last payment activity
Payment type   Scheduled Payment
Date   Dec 12, 2010
Amount received   $100.00 USD
Payment Status   Success
Shipping address
Ship to   N/A

Here is a profile for someone who we initiated from PayPal using the Recurring Payment Profile/Create Profile functionality on PayPal's website.
Quote
Recurring Payments: Profile Details via - Website Payments Pro
Profile information
Profile ID   I-GSPFD810KR5H
Product/service   Online Contribution: Support Coffee Strong
Merchant reference ID   Online Contribution: Support Coffee Strong
Start date   Dec 17, 2010
End date   Indefinite - continue until canceled
Profile Status   Active
 ||Modify|
Buyer information
Name {omitted}
Email   {omitted}
Billing terms
Next payment date   Jan 17, 2011
Failed payments maximum (What's this?This recurring payment profile will be automatically suspended after this number of failed payments.)   No limit
Add missed payments to next billing?   No
Payment activity
Payment type   Initial Payment
Amount due   $0.00 USD
Amount received   $0.00 USD
Payment type   
Payment cycle   
Total cycles   
Cycles remaining   
Amount due per cycle    Details
Amount received   
Payment type   Regular Recurring Payment
Payment cycle   Monthly
Total cycles   Indefinite
Cycles remaining   Indefinite
Amount due per cycle   $6.00 USD Details
Amount received   $6.00 USD
Payment summary
Total received   $6.00 USD Details
Last payment activity
Payment type   Scheduled Payment
Date   Dec 17, 2010
Amount received   $6.00 USD
Payment Status   Success

Clearly, there's a difference in the Merchant reference ID field, which appears to be passing some tokens along.  What are those tokens/what do these tokens represent? How are they generated, and is it even possible to initiate/create a payment outside CiviCRM?

Something I noticed while I was mucking around:  When the Merchant Reference ID field just has descriptive text, the Civicrm.longstringofcharacters.log gives date/time [info] could not get module name from request url  When I pass something like m=contribute (guessing the module name was the m=token) i get NO INFORMATION posted in the log, and no parsing of data.  Curious, no?

Thanks, Lobo, this is an incredible F/OSS product that is bringing good things to good people.  It seems to get better and better with each new release.

podfish

  • I’m new here
  • *
  • Posts: 11
  • Karma: 1
Re: PayPal Recurring -- Profile Initiated on Paypal
December 20, 2010, 10:21:39 am
More fun details:

Found one of my modified manual entries in the error log.
Quote
Dec 18 13:24:37  [info] $GET = Array
(
)


Dec 18 13:24:37  [info] $POST = Array
(
    [payment_cycle] => Monthly
    [txn_type] => recurring_payment_profile_created
    [last_name] => Hamilton
    [next_payment_date] => 02:00:00 Dec 25, 2010 PST
    [residence_country] => US
    [initial_payment_amount] => 0.00
    [rp_invoice_id] => m=contribute
    [currency_code] => USD
    [time_created] => 13:24:47 Dec 18, 2010 PST
    [verify_sign] => ArWTudj9ay95ZHO15ZxmQmdam7S.AZJCRGeltXjirhe-3rwT05nEeeYB
    [period_type] =>  Regular
    [payer_status] => unverified
    [tax] => 0.00
    [payer_email] => {omitted}
    [first_name] => {omitted}
    [receiver_email] => finance@coffeestrong.org
    [payer_id] => ASRNK53FHW7VA
    [product_type] => 1
    [shipping] => 0.00
    [amount_per_cycle] => 60.00
    [profile_status] => Active
    [charset] => windows-1252
    [notify_version] => 3.0
    [amount] => 60.00
    [outstanding_balance] => 0.00
    [recurring_payment_id] => I-56XHTJXJ813W
    [product_name] => Online Contribution: Support Coffee Strong
)

i put in "m=contribute" as I described in the earlier post.  So, I know for certain the IPN is getting here, and it looks like CiviCRM is attempting to parse, but I don't get a "successful" message like I do with the successful posts.  I'm going to look in the database proper to see if there are any contrib records for this guy.  (this is the initial zero record for establishing the recurring contribution with a "next contrib" date sometime in the future.

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: PayPal Recurring -- Profile Initiated on Paypal
December 20, 2010, 06:58:45 pm

The notify url is a lot more complex and has the ids of a few DB objects and at least one hash (to avoid cross site forgery attempts)

check: CRM/Core/Payment/PayPalImpl.php, search for notifyURL. and the search for recur to see what additional variables recurring contributions add

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) »
  • PayPal Recurring -- Profile Initiated on Paypal

This forum was archived on 2017-11-26.