ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Simple Commerce Module - Recurring Payments

September 23, 2011 7:22am

Subscribe [3]
  • #1 / Sep 23, 2011 7:22am

    IOS Admin

    33 posts

    On the purchase detail page for the Simple Commerce Module there is a note that says:

    “* Recurring purchases must be set up through PayPal for full functionality.”

    What exactly does that mean? The docs do not seem to explain.

    I put through a subscription and the “* Purchase Identification Number (TXN ID)” field shows “PENDING”. Why is this? Is there more I have to do? It has been this way for over 12 hours.


    Also, what is the future of the Simple Commerce Module. I am about to use it on a project and I don’t want to find out in a few months that it’s going to be dropped.

    I would buy an Add-On but unfortunately none of them do what I need yet and Simple Commerce does. I need recurring payments with PayPal Standard (NOT Express Checkout as I need users to also pay by CC without PayPal Account)

    Thanks

  • #2 / Sep 23, 2011 1:09pm

    IOS Admin

    33 posts

    As I have looked into this more I believe I may have found a bug.

    In my testing I sent through another subscription. This one worked fine. That made me wonder what went wrong the first time. I was reminded of an issue I had on a previous project where I was doing a similar PayPal integration in my own custom code. One issue I had then is the real possibility the subscription IPN notifications may not come in the proper order for various reasons. This is probably only an issue when creating a new subscription as two notifications are sent. One to create the subscription and a second to apply the payment. I had to make sure I ignored the payment notification (sent back a 400) until the subscription notification had been processed and the new subscription created. That’s because the payment has to be connected to a subscription record and if it’s not created you can’t connect to it.

    The Simple Commerce Module’s code for “subscription_payment” tries to find an existing subscription and if it doesn’t find one it returns FALSE out of the functions. But it then also seems to return a 200 response to PayPal tell them I have processed this notification.

    So if the Simple Commerce Module receives the payment notification first it will be ignored and PayPal will not send it again. The subscription notification is received and the subscription is created, but since PayPal will not be sending the payment notification again the subscription will never be taken out of the pending state.

    This scenario needs to be handled.

    Also reading the notes in the code there also is an issue with multiple subscriptions of the same type/item. This will be a problem for me as I will need users to possibly purchase more than one subscription of a particular type/item.

    Please verify these issues and let me know when they might be addressed.

    Thanks

  • #3 / Sep 23, 2011 3:27pm

    IOS Admin

    33 posts

    I’m thinking about creating my own module starting from the Simple Commerce Module and expanding and adjusting it for my needs. Is that ok licensing wise as long as it is only for use on the site associated with my EE license and that I don’t share or sell it?

    I realize that I will lose the benefits of any future updates to the Simple Commerce Module, but at this point it seems like my best option.

  • #4 / Sep 24, 2011 5:13pm

    Dan Decker

    7338 posts

    Hello IOS Admin,

    You are free to make any changes you like to any parts of ExpressionEngine. As you already understand, you will then be unsupported (on SImple Commerce at least) and you would not be allowed to sell or give away your modifications. Is there anything else we can assist you with?

    Cheers,

  • #5 / Sep 25, 2011 10:54am

    IOS Admin

    33 posts

    I would love answers/comments on these items I posted.

    - “Also, what is the future of the Simple Commerce Module. I am about to use it on a project and I don’t want to find out in a few months that it’s going to be dropped.”

    - Please verify if the issues I brought up with Simple Commerce Module. Bugs? When might these be address?
      1. Out of order IPN requests can cause subscriptions to stay in pending state.
      2. Multiple subscriptions per member not handled.

  • #6 / Sep 25, 2011 11:19am

    Dan Decker

    7338 posts

    IOS Admin,

    I can’t comment on the future of Simple Commerce, because I simply don’t know. I can’t imaging that it is in danger of being discontinued anytime soon, or at all. As to your other concerns, I’ll escalate those to our Dev Team, as they are better suited to addressing those items.

    Cheers,

  • #7 / Sep 29, 2011 10:05am

    Robin Sowell

    13255 posts

    Just to note- did enter a bug report on the possible issue with ordering payment/subsubscription.  As Dan note, the module isn’t in danger of going way, and we’ll be sure to hit that bug.

    Multiple subscriptions…  I’ve put in a bug report to doule check the behavior- it should only expire one, but needs a test to be sure it’s getting the right one- so I wanted to make sure that was double checked.

  • #8 / Sep 30, 2011 5:02pm

    IOS Admin

    33 posts

    New Information

    Not sure if this is something that would rise to the bug level or even something to be changed. The name of a Simple Commerce Module field is misleading.

    In my work, based on the Simple Commerce Module, I have come to realize (with help from PayPal integration support) that the SUBSCR_ID returned by PayPal’s IPN is in fact the subscription’s Profile ID which is unique to each subscription. The PayPal docs define this variable as Subscriber ID which is not totally correct. You would expect a Subscriber ID to be unique to the subscriber but the same on multiple subscriptions for the same user. This is not the case.

    To me, this is a good thing as the Profile ID can then be used by PayPal’s ManageRecurringPaymentsProfileStatus API to cancel a specific subscription. Now I can provide and interface for users to cancel a subscription. Very handy.

    Hopefully this will help in making Simple Commerce Module better in the future.

    So, EE may want to consider a change to the “paypal_subscriber_id” field name or make note of what to expect from this field.

  • #9 / Oct 03, 2011 3:12pm

    Robin Sowell

    13255 posts

    It is pretty confusing- what I went with to help out anyone poking in the code?  Was a comment in the two spots where confusion was most likely to arise:

    // What if multiple subscriptions?  
      // Note that paypal_subscriber_id is unique to each subscription despite the way it sounds

    I think that will help clarify while still keeping the variable naming consistent with the paypal docs (and I’d prefer not to change field names w/out a really strong reason).

    Appreciate your input on this one, IOS.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases