Search

@qnn You should be able to set your form up like below in order to start a reoccurring payment. you might have to do some minor tweaking to the extension if it scrubs out some of these variables.

<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="paypal-payments[currency_code]" value="USD">
<input type="hidden" name="paypal-payments[no_shipping]" value="1">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="paypal-payments[item_name]" value="My Subscription">
<input type="hidden" name="paypal-payments[a3]" value="5.00">
<input type="hidden" name="paypal-payments[p3]" value="1"> 
<input type="hidden" name="paypal-payments[t3]" value="M">

a3 - amount to billed each recurrence
p3 - number of time periods between each recurrence
t3 - time period (D=days, W=weeks, M=months, Y=years)

I've already done that part and it works perfectly... After a member submits the order a new entry is created in 'Subscriptions' with the info plus some variables from IPN... I am wondering what happens next month when PayPal charges the member again...

Will PayPal send another IPN and how should I set up my section? Because it's a subscription I have to make sure that if the member cancels the subscription or if the payments fail, their account on the site get's suspended.

For one, I suppose, I should change the invoice field to rpinvoiceid. Also, I was thinking of using PayPal IPN's payment_status, nextpaymentdate and time_created to verify on our-end that people have active subscription.

It's a while since I did any paypal development but a few points if I recall correctly:

To correctly process all the IPN events you'll need to modify the IPN event and adjust the logic slightly

  1. Paypal will send multiple IPN (instant payment notifications) notifications initially, one to say that the subscription has been setup and two that the first payment has been taken. (The extension will log both but parse the second into your section)
  2. Each month paypal will send another notification of payment but you'll probably need some custom php to handle this logic
  3. If the use cancels then there are a few notifications sent, see here which are a little complicated

In terms of symphony sections there are a few ways to do it but they do all require some custom event php. The simplest way (not necessarily the best) you can do it as follows:

  1. Have a 'subscriptions' section that has an 'expiry date' parameter
  2. Add some custom event php so that everytime a valid payment is logged, the expiry date is incremented by the correct months/years.
  3. Now to access the subscriptions all you have to do is filter by subscriptions that haven't expired

A better way to do it woud be to store more information, such as 'cancelled', 'last renewal date', 'active' etc and this would potentially allow you to build a better admin area for yourself. Lastly if you want the user to be able to view their payments from within the site, you would want to create a 'transactions' section that is essentially a mirror of the data that the paypal extension stores. Thus everytime a payment is registered, you copy the data into a new entry and save it. You can attach it to the parent 'subscription' via a select box link and you can then use datasources etc to manipulate/display info.

That's been a bit of a whistlestop tour of the subject, sorry If I've pitched it at too high/low a level but let me know if you have anymore questions - drop me an email as I'll respond quicker dave at veodesign.co.uk :)

Dear,

Is the extension compatible with Version: 2.3.2? The rerouting works but the event Save IPN data doesn't seem to work, it's attached to the correct page (=notify url), i have resended the ipn again with the paypal control panel but nothing..

Thanks in advance!

@wdebusschere I currently have this extension running on two separate sites that are running 2.3.2. Everything appears to work for the most part however I do run into a few IPNs that don't get saved to the transaction log successfully. I used to be able to resend the IPN on the few that didn't work properly, however it appears that Pay Pal is having issues with the resend IPN functionality, it doesn't seem that new IPNs are sent at all and no new entries appear on the IPN History page.

I believe is a problem with the HTTP headers that Symphony is returning on a failed attempted to save the IPN/authenticate. Because when looking at the IPN logs on paypal all the failed ones appear to have successfully posted. I believe the extension needs to send the proper headers instead of just returning null, which would give paypal a status of 200 and would believe it was a success. If this is altered than paypal should resend the IPN automatically.

@koolaid, please see the image with the paypal configuration, is it normal that there is no notify url when i check the ipn details on the paypal site? I have it in my form: and in the paypal ipn - current settings./alt text/

@wdebusschere All of my transactions that have successfully sent over IPN information to my site, have a blank notification URL. Also I have the same setup up you have.

I also have the notify url set in the form on my symphony site.

<input name="paypal-payments[notify_url]" value="http://mysite.com/paypalIPNPage/" type="hidden">

Koolaid, thanks, do you also have the same configuration in paypal?

@wdebusschere

Yes I have the same set up for my first site. However I also have a anther paypal account link to the default sites email address and that is also working just by adding the paypal-payments[notify_url] to the second site's form. When you link an email address in paypal you don't get an additional set of settings for that email.

@koolaid

I added some logging to the event, and discovered that everything goes well until the CURL lines, $result = curl_exec($ch); $result is always empty. CURL is enabled..

cURL support enabled cURL Information 7.21.0 Age 3 Features AsynchDNS No Debug No GSS-Negotiate Yes IDN Yes IPv6 Yes Largefile Yes NTLM Yes SPNEGO No SSL Yes SSPI No krb4 No libz Yes CharConv No Protocols dict, file, ftp, ftps, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host x86_64-pc-linux-gnu SSL Version OpenSSL/0.9.8o ZLib Version 1.2.3.4 libSSH Version libssh2/1.2.6

@koolaid

Logged the curlerror($ch): Got SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3GETSERVERCERTIFICATE:certificate verify failed when processing IPN data

Website is hosted on a shared hostingpack.

@koolaid,

Problem solved by adding the line

 curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__)."/cert/api_cert_chain.crt");/

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details