We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30473
    • 12 Posts
    I’m wondering if anyone has figured out a way of coordinating MODx with Paypal IPN. Seems to me those two could coordinate to create a subscription-based site that would allow a webmaster to charge for content and have Paypal IPN handle account signups and payments. And that’s pretty well what I’m after!
      • 20289
      • 958 Posts
        [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
        [td][Wiki] [Persian support forum]
        [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
        [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
        • 30473
        • 12 Posts
        Thanks for the suggestion. I don’t think, though, that this will really solve the problem.
          • 23072
          • 150 Posts
          It should just be a simple case of writing a snippet to do the job from what I gather on the Paypal website: https://www.paypal.com/cgi-bin/webscr?cmd=p/xcl/rec/ipn-code-outside

          Since all it’s doing is grabbing some variables and checking some data against what you’ve got on your site, once you’ve written your side of things the transaction interaction with Paypal looks pretty easy.

          The thing is though, there’s little point writing a bunch of snippets for this and adding them to the repository unless you had a specific need for them. Why I say this is that different companies will want to store different client data, sell different numbers of items (from one to a million), have different categories for their products etc, so unless someone really fancies writing a whole shopping cart script or makes a decision on what customer data should be stored by default.

          If you were selling one item - a script or a service for example - you wouldn’t need a full-blown shopping script. You probably wouldn’t want to store much customer data either. If you were selling many items, you’d need something more like a full-blown e-commerce script and you’d probably want to store a lot more details.

          So... it looks easy enough to interact with Paypal as all you’re doing is passing basic information to it and returning some other info from it, but the work is in writing your own side of the application if you see what I mean smiley
            Notanotherdotcom Ltd

            Web | Print | Marketing
            • 30473
            • 12 Posts
            Thanks for the reply.

            In my thinking, MODx is just one short hop away from being able to function very well as subscription software (i.e. - if you pay you can read my site). All it needs is a way of creating user accounts for those who pay for the privilege. This could, in theory, be handled through Paypal’s IPN, I believe. I’m just not smart enough to make it happen. Thus I’m wondering if someone else out there has been able to do this.
              • 23072
              • 150 Posts
              Ah, well that should be simpler, but I’m not too clued up on the user groups and related code to help I’m afraid sad

              In theory though, it sounds like it would just need a form where folks can enter their details to become a member of this group, the details would go to Paypal, Paypal would then confirm the payment and pass the data back to the snippet and the user’s group would then be changed.

              Then in each "customer-only" page you just need to check they’re in a certain user group somehow.

              On the bright side it all sounds very do-able smiley
                Notanotherdotcom Ltd

                Web | Print | Marketing
                • 964
                • 11 Posts
                Quote from: totally_vacant at Jan 24, 2007, 11:53 AM

                Thanks for the reply.

                In my thinking, MODx is just one short hop away from being able to function very well as subscription software (i.e. - if you pay you can read my site). All it needs is a way of creating user accounts for those who pay for the privilege. This could, in theory, be handled through Paypal’s IPN, I believe. I’m just not smart enough to make it happen. Thus I’m wondering if someone else out there has been able to do this.

                I’m sure the original OP has long solved his problem, but there’s apparently a new company called Spreedly which has an API for this sort of subscription service: https://spreedly.com/manual/integration-guide/

                If you want to go down the IPN route: I would recommend using CodeIgniter, which is a lightweight PHP framework with excellent PayPal/IPN support. It’s easy to setup CodeIgniter to run in parallel to MODx; you can then setup your webserver to direct the appropriate IPN-related URLs to CodeIgniter rather than MODx, and CodeIgniter will handle the rest. This is what we do for our ecomm sites. cool